class_docstr: A simple linear regression model used for testing.
class_docstr_tok: ["A","simple","linear","regression","model","used","for","testing","."]
code: def update_metadata_from(self, datapoint: SampleDatapoint) -> None:
      if self.__num_features is None:
          self.__num_features = len(datapoint.input_features)
      else:
          assert self.__num_features == len(datapoint.input_features)
  
imports: import numpy
  import torch
  from torch import nn
  from typing import Any, Dict, Iterator, NamedTuple, Optional, Union
  from ptgnn.baseneuralmodel import AbstractNeuralModel, ModuleWithMetrics
  from ptgnn.baseneuralmodel.utils.data import enforce_not_None
  from ptgnn.tests.simplemodel.data import SampleDatapoint
label_desc: Use image node_id 2 for calling the SimpleRegressionModel obj's underlying member method code with example usage: obj.update_metadata_from(datapoint) without return types