code: def _array_feature_extrator(data, indices):  # type: ignore
      """Implementation of operator *ArrayFeatureExtractor*."""
      if len(indices.shape) == 2 and indices.shape[0] == 1:
          index = indices.ravel().tolist()
          add = len(index)
      elif len(indices.shape) == 1:
          index = indices.tolist()
          add = len(index)
      else:
          add = 1
          for s in indices.shape:
              add *= s
          index = indices.ravel().tolist()
      if len(data.shape) == 1:
          new_shape = (1, add)
      else:
          new_shape = [*data.shape[:-1], add]
      try:
          tem = data[..., index]
      except IndexError as e:
          raise RuntimeError(
              f"data.shape={data.shape}, indices={indices}"
          ) from e
      res = tem.reshape(new_shape)
      return res
  
imports: from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
label_desc: Use image node_id 1 for calling a global function with example usage: _array_feature_extrator(data, indices) and returns: res