docs: def get_inventory_str(self, keys=None):
          """
          Convert a dict generated by ansible.LagoAnsible.get_inventory
          to an INI-like file.
  
          Args:
              keys (list of str): Path to the keys that will be used to
                  create groups.
  
          Returns:
              str: INI-like Ansible inventory
          """
          inventory = self.get_inventory(keys)
          lines = []
          for name, hosts in inventory.viewitems():
              lines.append('[{name}]'.format(name=name))
              for host in sorted(hosts):
                  lines.append(host)
  
          return '\n'.join(lines)