(self, scope_identifier)
Finds the root element of the given scope and returns it.

    This function allows the access to a nested scope that is a child of this
    element. The `scope_identifier` argument specifies the path to the child
    scope element.

    Args:
      scope_identifier: The path of the desired scope element.

    Returns:
      An `mjcf.Element` object, or `None` if a scope element with the
      specified path is not found.
Finds the root element of the given scope and returns it.
Finds the root element of the given scope and returns it .
def enter_scope(self, scope_identifier):
    """Finds the root element of the given scope and returns it.

    This function allows the access to a nested scope that is a child of this
    element. The `scope_identifier` argument specifies the path to the child
    scope element.

    Args:
      scope_identifier: The path of the desired scope element.

    Returns:
      An `mjcf.Element` object, or `None` if a scope element with the
      specified path is not found.
    """
    if constants.PREFIX_SEPARATOR in scope_identifier:
      scope_name = scope_identifier.split(constants.PREFIX_SEPARATOR)[0]
      try:
        attachment = self.namescope.get('attached_model', scope_name)
      except KeyError:
        return None

      scope_suffix = scope_identifier[(len(scope_name) + 1):]
      if scope_suffix:
        return attachment.enter_scope(scope_suffix)
      else:
        return attachment
    else:
      try:
        return self.namescope.get('attached_model', scope_identifier)
      except KeyError:
        return None
def enter_scope ( self , scope_identifier ) : if constants . PREFIX_SEPARATOR in scope_identifier : scope_name = scope_identifier . split ( constants . PREFIX_SEPARATOR ) [ 0 ] try : attachment = self . namescope . get ( 'attached_model' , scope_name ) except KeyError : return None scope_suffix = scope_identifier [ ( len ( scope_name ) + 1 ) : ] if scope_suffix : return attachment . enter_scope ( scope_suffix ) else : return attachment else : try : return self . namescope . get ( 'attached_model' , scope_identifier ) except KeyError : return None