code: def _normalize_numpy_indices(i):
      """Normalize the index in case it is a numpy integer or boolean
      array."""
      if isinstance(i, np.ndarray):
          if i.dtype == bool:
              i = tuple(j.tolist() for j in i.nonzero())
          elif i.dtype == int:
              i = i.tolist()
      return i
  
imports: from collections.abc import Mapping, Sequence
  from contextlib import contextmanager
  from enum import Enum
  from functools import partial
  import io
  from itertools import tee
  import pathlib
  import warnings
  import numpy
  from scipy import sparse
  import sklearn
  from sklearn.exceptions import NotFittedError
  from sklearn.utils import _safe_indexing
  from sklearn.utils.validation import check_is_fitted
  import torch
  from torch.nn import BCELoss
  from torch.nn import BCEWithLogitsLoss
  from torch.nn import CrossEntropyLoss
  from torch.nn.utils.rnn import PackedSequence
  from torch.utils.data.dataset import Subset
  from skorch.exceptions import DeviceWarning
  from skorch.exceptions import NotInitializedError
label_desc: Use image node_id 17 for calling a global function with example usage: _normalize_numpy_indices(i) and returns: i