(self, elem)
Registers an `Element` and returns debugging metadata for the XML.

    Args:
      elem: An `mjcf.Element`.

    Returns:
      An `lxml.etree.Comment` that represents debugging metadata in the
      generated XML.
Registers an `Element` and returns debugging metadata for the XML.
Registers an Element and returns debugging metadata for the XML .
def register_element_for_debugging(self, elem):
    """Registers an `Element` and returns debugging metadata for the XML.

    Args:
      elem: An `mjcf.Element`.

    Returns:
      An `lxml.etree.Comment` that represents debugging metadata in the
      generated XML.
    """
    if not debug_mode():
      return None
    else:
      self._debug_info_for_element_ids[id(elem)] = ElementDebugInfo(
          elem,
          copy.deepcopy(elem.get_init_stack()),
          copy.deepcopy(elem.get_last_modified_stacks_for_all_attributes()))
      return etree.Comment('{}:{}'.format(DEBUG_METADATA_PREFIX, id(elem)))
def register_element_for_debugging ( self , elem ) : if not debug_mode ( ) : return None else : self . _debug_info_for_element_ids [ id ( elem ) ] = ElementDebugInfo ( elem , copy . deepcopy ( elem . get_init_stack ( ) ) , copy . deepcopy ( elem . get_last_modified_stacks_for_all_attributes ( ) ) ) return etree . Comment ( '{}:{}' . format ( DEBUG_METADATA_PREFIX , id ( elem ) ) )