Reorder paths using python

If I had to guess, I would say that the native GH components are somehow keeping track of the actual Rhino Object IDs and/or Rhino Objects.
When you pass your referenced geometry through a component, it becomes a GH object, with a unique GH GUID.
As far as I know, GH objects do NOT store the attributes of their referenced Rhino counterparts.
You will need to someone, retrieve/store the RHINO obj and use that to retrieve attributes. Object attributes, (again, as far as I know,) are stored in the RHINO document.

from ghpythonlib.componentbase import executingcomponent as component
import Grasshopper, GhPython
import System
import Rhino

class MyComponent(component):
    
    def RunScript(self, x):
        GHobj = x #This is now a Grasshopper Object
        GHobjID = x.ToString() #Grasshopper Object ID
        RobjID = self.Params.Input[0].VolatileData[0][0].ReferenceID.ToString() #Referenced Rhino ObjectID
        Robj = self.Params.Input[0].VolatileData[0][0] #Referenced Rhino Object
        # return outputs if you have them; here I try it for you:
        return (GHobj, GHobjID, RobjID, Robj)