If a Lighting fixture for instance is connected to a Electrical Circuit, is there a way to get the electrical circuit?

What I did was to loop true all circuits and then have an if-statment like:

For c in circuits:
If Panel = circuit panel name and circuit number = circuit panel number then
#Here c is the circuit that the element is connected to

The problem is that it takes long time to run the script. The cript would probably run faster if there was a way like:

The-Circuit-element = Element_Lighting_fixture.Get_circuit