def __init__(self, groups=None):
        super(GroupedRequirements, self).__init__(NamedRequirements)
        self.groups = groups or self.default_groups
        self.filename = None
        self.create_default_groups()
def read_specific_examples(
        netcdf_file_name, read_all_target_vars, full_storm_id_strings,
        storm_times_unix_sec, target_name=None, include_soundings=True,
        radar_field_names_to_keep=None, radar_heights_to_keep_m_agl=None,
        sounding_field_names_to_keep=None, sounding_heights_to_keep_m_agl=None,
        num_rows_to_keep=None, num_columns_to_keep=None):
    """Reads specific examples (with specific ID-time pairs) from NetCDF file.

    :param netcdf_file_name: Path to input file.
    :param read_all_target_vars: See doc for `read_example_file`.
    :param full_storm_id_strings: length-E list of storm IDs.
    :param storm_times_unix_sec: length-E numpy array of valid times.
    :param target_name: See doc for `read_example_file`.
    :param metadata_only: Same.
    :param include_soundings: Same.
    :param radar_field_names_to_keep: Same.
    :param radar_heights_to_keep_m_agl: Same.
    :param sounding_field_names_to_keep: Same.
    :param sounding_heights_to_keep_m_agl: Same.
    :param num_rows_to_keep: Same.
    :param num_columns_to_keep: Same.
    :return: example_dict: See doc for `write_example_file`.
    """

    if (
            target_name ==
            'tornado_lead-time=0000-3600sec_distance=00000-10000m'
    ):
        target_name = (
            'tornado_lead-time=0000-3600sec_distance=00000-30000m_min-fujita=0'
        )

    error_checking.assert_is_boolean(read_all_target_vars)
    error_checking.assert_is_boolean(include_soundings)

    example_dict, dataset_object = _read_metadata_from_example_file(
        netcdf_file_name=netcdf_file_name, include_soundings=include_soundings)

    example_indices_to_keep = tracking_utils.find_storm_objects(
        all_id_strings=example_dict[FULL_IDS_KEY],
        all_times_unix_sec=example_dict[STORM_TIMES_KEY],
        id_strings_to_keep=full_storm_id_strings,
        times_to_keep_unix_sec=storm_times_unix_sec, allow_missing=False
    )

    example_dict[FULL_IDS_KEY] = [
        example_dict[FULL_IDS_KEY][k] for k in example_indices_to_keep
    ]
    example_dict[STORM_TIMES_KEY] = example_dict[STORM_TIMES_KEY][
        example_indices_to_keep]

    if read_all_target_vars:
        example_dict[TARGET_MATRIX_KEY] = numpy.array(
            dataset_object.variables[TARGET_MATRIX_KEY][
                example_indices_to_keep, :],
            dtype=int
        )
    else:
        target_index = example_dict[TARGET_NAMES_KEY].index(target_name)
        example_dict[TARGET_NAME_KEY] = target_name
        example_dict.pop(TARGET_NAMES_KEY)

        example_dict[TARGET_VALUES_KEY] = numpy.array(
            dataset_object.variables[TARGET_MATRIX_KEY][
                example_indices_to_keep, target_index],
            dtype=int
        )

    example_dict = _subset_radar_data(
        example_dict=example_dict, netcdf_dataset_object=dataset_object,
        example_indices_to_keep=example_indices_to_keep,
        field_names_to_keep=radar_field_names_to_keep,
        heights_to_keep_m_agl=radar_heights_to_keep_m_agl,
        num_rows_to_keep=num_rows_to_keep,
        num_columns_to_keep=num_columns_to_keep)

    if not include_soundings:
        dataset_object.close()
        return example_dict

    example_dict = _subset_sounding_data(
        example_dict=example_dict, netcdf_dataset_object=dataset_object,
        example_indices_to_keep=example_indices_to_keep,
        field_names_to_keep=sounding_field_names_to_keep,
        heights_to_keep_m_agl=sounding_heights_to_keep_m_agl)

    dataset_object.close()
    return example_dict