'Create and return an ElementTree repository info Element.'

def generate_repository_info_elem(self, tool_shed, repository_name, changeset_revision, owner, parent_elem=None, **kwd):

    if (parent_elem is None):
        elem = XmlET.Element('tool_shed_repository')
    else:
        elem = XmlET.SubElement(parent_elem, 'tool_shed_repository')
    tool_shed_elem = XmlET.SubElement(elem, 'tool_shed')
    tool_shed_elem.text = tool_shed
    repository_name_elem = XmlET.SubElement(elem, 'repository_name')
    repository_name_elem.text = repository_name
    repository_owner_elem = XmlET.SubElement(elem, 'repository_owner')
    repository_owner_elem.text = owner
    changeset_revision_elem = XmlET.SubElement(elem, 'installed_changeset_revision')
    changeset_revision_elem.text = changeset_revision
    for (key, value) in kwd.items():
        new_elem = XmlET.SubElement(elem, key)
        new_elem.text = value
    return elem
