def METHOD_NAME(self, resourcepool, predecessor):
    rpObj = VSphereResourcePool(id=resourcepool._moId, name=resourcepool.name)
    self.graph.add_resource(predecessor, rpObj)
    log.debug(f"Found ResourcePool - {resourcepool._moId} - {resourcepool.name}")
    for vm in resourcepool.vm:
        self.graph.add_edge(rpObj, self.instances_dict[vm._moId])
    for successorPool in resourcepool.resourcePool:
        log.debug(f"Found nested ResourcePool - {successorPool._moId} - {successorPool.name}")
        self.METHOD_NAME(successorPool, rpObj)