code: def build(self, input_shape):
      if isinstance(input_shape, list) and len(input_shape) == 2:
          self.data_mode = "disjoint"
      else:
          if len(input_shape) == 2:
              self.data_mode = "single"
          else:
              self.data_mode = "batch"
      super().build(input_shape)
  
imports: import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras import constraints, initializers, regularizers
  from tensorflow.keras.layers import Dense, Layer
  from spektral.layers import ops
label_desc: Use image node_id 2 for calling the GlobalPool obj's underlying member method code with example usage: obj.build(input_shape) without return types