'Return a copy of the received key_rd_dict with repository dependencies that are needed
only_if_compiling_contained_td filtered out of the list of repository dependencies for
each rd_key.'

def filter_only_if_compiling_contained_td(self, key_rd_dict):

    filtered_key_rd_dict = {}
    for (rd_key, required_rd_tup) in key_rd_dict.items():
        (tool_shed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td) = common_util.parse_repository_dependency_tuple(required_rd_tup)
        if (not asbool(only_if_compiling_contained_td)):
            filtered_key_rd_dict[rd_key] = required_rd_tup
    return filtered_key_rd_dict
