code: def finalize(self):
      if self.output_dim and (self.expected_dim() != self.output_dim):
          raise ValueError(
              "Expect the target data for {name} to have shape "
              "(batch_size, {output_dim}), "
              "but got {shape}.".format(
                  name=self.name,
                  output_dim=self.output_dim,
                  shape=self.shape,
              )
          )
  
file_path: autokeras/autokeras/analysers/output_analysers.py
imports: import numpy
  from autokeras.engine import analyser
label_desc: Use image node_id 2 for calling the RegressionAnalyser obj's underlying member method code with example usage: obj.finalize() without return types