code: def create_body_index(xml_string):
      
      xml = ET.fromstring(xml_string)
  
      body_to_index = {}
      for index, body in enumerate(xml.findall("*/Body/Name")):
          body_to_index[body.text.strip()] = index
  
      return body_to_index
docs: Extract a name to index dictionary from 6dof settings xml