'Make a call to the tool shed to get the required repository\'s tool_dependencies.xml file.'

def create_temporary_tool_dependencies_config(self, tool_shed_url, name, owner, changeset_revision):

    tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry(self.app, tool_shed_url)
    if ((tool_shed_url is None) or (name is None) or (owner is None) or (changeset_revision is None)):
        message = 'Unable    to    retrieve    required    tool_dependencies.xml    file    from    the    Tool    Shed    because    one    or    more    of    the    '
        message += ('following    required    parameters    is    None:    tool_shed_url:    %s,    name:    %s,    owner:    %s,    changeset_revision:    %s    ' % (str(tool_shed_url), str(name), str(owner), str(changeset_revision)))
        raise Exception(message)
    params = dict(name=name, owner=owner, changeset_revision=changeset_revision)
    pathspec = ['repository', 'get_tool_dependencies_config_contents']
    text = url_get(tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth(tool_shed_url), pathspec=pathspec, params=params)
    if text:
        fh = tempfile.NamedTemporaryFile('wb', prefix='tmp-toolshed-cttdc')
        tmp_filename = fh.name
        fh.close()
        fh = open(tmp_filename, 'wb')
        fh.write(text)
        fh.close()
        return tmp_filename
    else:
        message = 'Unable    to    retrieve    required    tool_dependencies.xml    file    from    the    Tool    Shed    for    revision    '
        message += ('%s    of    installed    repository    %s    owned    by    %s.' % (str(changeset_revision), str(name), str(owner)))
        raise Exception(message)
        return None
