code: def _to_tensor(self):
      data = self.model_inputs[0].zvalue
      indices = self.model_inputs[1].zvalue
  
      if self._initializer and isinstance(data, zautograd.Parameter):
          embedding = zlayers.Embedding(
              input_dim=data.shape[0],
              output_dim=data.shape[1],
              weights=data.get_weight(),
              input_length=indices.shape[1],
          )
          return embedding(indices)
      else:
          dim = int(self.onnx_attr["axis"])
          assert dim >= 1, "Currently only dim>=1 is supported."
          assert indices.shape == (
              1,
          ), "Currently only one index is supported."
          index = int(indices.get_weight().max())
          return zautograd.expand_dims(
              data.index_select(dim=dim, index=index), axis=dim
          )
  
file_path: analytics-zoo/pyzoo/zoo/pipeline/api/onnx/mapper/gather.py
imports: from zoo.pipeline.api.onnx.mapper.operator_mapper import OperatorMapper
  import zoo.pipeline.api.keras.layers
  import zoo.pipeline.api.autograd
  import bigdl.nn.layer
label_desc: Use image node_id 3 for calling the GatherMapper obj's underlying member method code with example usage: obj._to_tensor() and returns: embedding, zautograd