class_docstr: Trim the output to the correct number of samples.
  
  GraphGather always outputs fixed size batches.  This layer trims the output
  to the number of samples that were in the actual input tensors.
class_docstr_tok: ["Trim","the","output","to","the","correct","number","of","samples",".","GraphGather","always","outputs","fixed","size","batches",".","This","layer","trims","the","output","to","the","number","of","samples","that","were","in","the","actual","input","tensors","."]
code: def call(self, inputs):
      n_samples = tf.squeeze(inputs[1])
      return inputs[0][0:n_samples]
  
imports: from collections.abc import Sequence
  import deepchem
  import numpy
  import tensorflow
  from typing import List, Union, Tuple, Iterable, Dict, Optional
  from deepchem.utils.typing import OneOrMany, LossFn, ActivationFn
  from deepchem.data import Dataset, pad_features
  from deepchem.feat.mol_graphs import ConvMol
  from deepchem.metrics import to_one_hot
  from deepchem.models import KerasModel, layers
  from deepchem.models.losses import L2Loss, SoftmaxCrossEntropy, Loss
  from tensorflow.keras.layers import Input, Dense, Reshape, Softmax, Dropout, Activation, BatchNormalization
  import warnings
label_desc: Use image node_id 2 for calling the TrimGraphOutput obj's underlying member method code with example usage: obj.call(inputs) and returns: inputs