'Return True if the received required_repository is only needed to compile a tool
dependency defined for the received repository.'

def set_only_if_compiling_contained_td(self, repository, required_repository):

    required_repository_tup = [required_repository.tool_shed, required_repository.name, required_repository.owner, required_repository.changeset_revision]
    for tup in repository.tuples_of_repository_dependencies_needed_for_compiling_td:
        partial_tup = tup[0:4]
        if (partial_tup == required_repository_tup):
            return 'True'
    return 'False'
