OR Condition for Relationship

Hi

How to convert the below OR condition AML for relationship to IOM.

<AML>

<Item action ='get' type='Part'>

<Relationships>

<OR>

<AND>

<Item action ='get' type='Part Document'></Item>

</AND>

<AND>

<Item action ='get' type='Part BOM'></Item>

</AND>

</OR>

</Relationships>

</Item>

</AML>

Below option I tried, but getting not a single item error.

Item partItem = this.NewItem("Part", "get");
Item partBom = this.NewItem("Part BOM", "get");
Item partDoc = this.NewItem("Part Document","get");
Item logicalAND = partItem.newAND();
Item logicalOR = logicalAND.newOR();
logicalOR.addRelationship(partBom);
logicalOR.addRelationship(partDoc);
partItem = partItem.apply();

Thanks