parameters: (frame)
return_statement: return frame
docstring: Returns the nearest ancestor of the given frame attached to a robot
      link or rigid object
docstring_summary: Returns the nearest ancestor of the given frame attached to a robot
      link or rigid object
docstring_tokens: Returns the nearest ancestor of the given frame attached to a robot link or rigid object
function: def _ancestor_with_link(frame):
      """Returns the nearest ancestor of the given frame attached to a robot
      link or rigid object"""
      while frame and (frame._data == None or not isinstance(frame._data,(RobotModelLink,RigidObjectModel))):
          frame = frame._parent
      return frame
function_tokens: def _ancestor_with_link ( frame ) : while frame and ( frame . _data == None or not isinstance ( frame . _data , ( RobotModelLink , RigidObjectModel ) ) ) : frame = frame . _parent return frame