class_docstr: The features of an observation.
  
  These include both the arm parameters and the features of the
  observation found in the Data object: trial index, times,
  and random split. This object is meant to contain everything needed to
  represent this observation in a model feature space. It is essentially a
  row of Data joined with the arm parameters.
  
  An ObservationFeatures object would typically have a corresponding
  ObservationData object that provides the observed outcomes.
  
  Attributes:
      parameters: arm parameters
      trial_index: trial index
      start_time: batch start time
      end_time: batch end time
      random_split: random split
class_docstr_tok: ["The","features","of","an","observation",".","These","include","both","the","arm","parameters","and","the","features","of","the","observation","found","in","the","Data","object",":","trial","index",",","times",",","and","random","split",".","This","object","is","meant","to","contain","everything","needed","to","represent","this","observation","in","a","model","feature","space",".","It","is","essentially","a","row","of","Data","joined","with","the","arm","parameters",".","An","ObservationFeatures","object","would","typically","have","a","corresponding","ObservationData","object","that","provides","the","observed","outcomes",".","Attributes",":","parameters",":","arm","parameters","trial_index",":","trial","index","start_time",":","batch","start","time","end_time",":","batch","end","time","random_split",":","random","split"]
docstr: Updates the existing ObservationFeatures with the fields of the the input.
  
  Adds all of the new parameters to the existing parameters and overwrites
  any other fields that are not None on the new input features.
docstr_tok: ["Updates","the","existing","ObservationFeatures","with","the","fields","of","the","the","input",".","Adds","all","of","the","new","parameters","to","the","existing","parameters","and","overwrites","any","other","fields","that","are","not","None","on","the","new","input","features","."]
code: def update_features(
      self, new_features: ObservationFeatures
  ) -> ObservationFeatures:
      """Updates the existing ObservationFeatures with the fields of the the input.
  
      Adds all of the new parameters to the existing parameters and overwrites
      any other fields that are not None on the new input features."""
      self.parameters.update(new_features.parameters)
      if new_features.trial_index is not None:
          self.trial_index = new_features.trial_index
      if new_features.start_time is not None:
          self.start_time = new_features.start_time
      if new_features.end_time is not None:
          self.end_time = new_features.end_time
      if new_features.random_split is not None:
          self.random_split = new_features.random_split
      return self
  
imports: from __future__ import annotations
  import json
  import warnings
  from copy import deepcopy
  from typing import Dict, Iterable, List, Optional, Set, Tuple
  import ax.core.experiment
  import numpy
  import pandas
  from ax.core.arm import Arm
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.map_data import MapData
  from ax.core.types import TCandidateMetadata, TParameterization
  from ax.utils.common.base import Base
  from ax.utils.common.constants import Keys
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 3 for calling the ObservationFeatures obj's underlying member method code with example usage: obj.update_features(new_features) and returns: self