Retrieve logical component and nodePC states

If you are using the element of interest you can define on a diagram, you can use the following method:

pc.get_element_of_interest_for_diagrams()

That returns the list of Diagram where this element is an element of interest.

You also have contextual element:

pc.get_contextual_element_for_diagrams()

if you navigate from the diagram:

myDiagram.get_elements_of_interest()
myDiagram.get_contextual_elements()

if the element is not on a reference above and just in the diagram, you can use:

myDiagram.get_represented_elements()

You can check this post for more details on the last method.