def METHOD_NAME(self, idx_spec):
    """
    Parameters
    ----------
    idx_spec : str
        A string in the form of a pair of brackets enclosing some
        index expression matching Datasets in the file
    Returns
    -------
    result : list
        A list of indexes that can be used to access each Dataset
        matching the pattern
    """
    # if index is missing, assume to open the first Dataset we know how
    # to do something with
    if idx_spec is None or idx_spec == '':
        idx = self.find_first_good_idx()
        return [idx]
    match = re.match(r'^\[(.+)\]$', idx_spec)
    if not match:
        return []
    name = match.group(1).strip()
    if re.match(r'^\d+$', name):
        # index just names a single dataset by number
        # Assume this means by order in the list
        return [int(name)]
    # find all datasets matching the name
    # TODO: could do some kind of regular expression matching
    idx_lst = []
    idx = 0
    for d_name in self.get_indexes():
        if name == '*' or name == d_name:
            idx_lst.append(d_name)
    return idx_lst