def get_datasets_with_substrings(datasets_list, name_substrings):
    """
    Filters list of datasets with specified substrings (e.g. github usernames) in them

    :param datasets_list: list of dataset_ids
    :param name_substrings: identifies substrings that help identify datasets to delete
    :return: list of dataset_ids with any substring in their dataset_id
    """
    datasets_with_substrings = []
    for dataset in datasets_list:
        if any(name_substring in dataset for name_substring in name_substrings):
            datasets_with_substrings.append(dataset)
    return datasets_with_substrings