class_docstr: Class to add epoch selection and metadata to certain classes.
class_docstr_tok: ["Class","to","add","epoch","selection","and","metadata","to","certain","classes","."]
code: def _item_to_select(self, item):
      if isinstance(item, str):
          item = [item]
  
      # Convert string to indices
      if (
          isinstance(item, (list, tuple))
          and len(item) > 0
          and isinstance(item[0], str)
      ):
          select = self._keys_to_idx(item)
      elif isinstance(item, slice):
          select = item
      else:
          select = np.atleast_1d(item)
          if len(select) == 0:
              select = np.array([], int)
      return select
  
imports: import json
  import logging
  from collections import OrderedDict
  from copy import deepcopy
  import numpy
  from ._logging import verbose, warn
  from .check import _check_pandas_installed, _check_preload, _validate_type
  from .numerics import _time_mask, object_hash, object_size
label_desc: Use image node_id 2 for calling the GetEpochsMixin obj's underlying member method code with example usage: obj._item_to_select(item) and returns: select