docs: def parse_xml_string(self, xml, id_generator=None):
          """Parse a string of XML, returning a usage id."""
          if id_generator is not None:
              warnings.warn(
                  "Passing an id_generator directly is deprecated "
                  "in favor of constructing the Runtime with the id_generator",
                  DeprecationWarning,
                  stacklevel=2,
              )
  
          id_generator = id_generator or self.id_generator
          if isinstance(xml, six.binary_type):
              io_type = BytesIO
          else:
              io_type = StringIO
          return self.parse_xml_file(io_type(xml), id_generator)