code: def finalize(self):
      if len(self.shape) not in [3, 4]:
          raise ValueError(
              "Expect the data to ImageInput to have shape (batch_size, "
              "height, width, channels) or (batch_size, height, width) "
              "dimensions, but got input shape {shape}".format(
                  shape=self.shape
              )
          )
  
imports: import numpy
  import tensorflow
  from autokeras.engine import analyser
label_desc: Use image node_id 2 for calling the ImageAnalyser obj's underlying member method code with example usage: obj.finalize() without return types