code: def add_dataset(
      self,
      source: types.Union[types.Sequence, types.JSFunc] = None,
      dimensions: types.Optional[types.Sequence] = None,
      source_header: types.Optional[bool] = None,
      transform: types.Optional[
          Sequence[opts.DatasetTransformOpts]
      ] = None,
      from_dataset_index: types.Optional[types.Numeric] = None,
      from_dataset_id: types.Optional[types.Numeric] = None,
      from_transform_result: types.Optional[types.Numeric] = None,
  ):
      if self.options.get("dataset") is not None:
          self.options.get("dataset").append(
              {
                  "source": source,
                  "dimensions": dimensions,
                  "sourceHeader": source_header,
                  "transform": transform,
                  "fromDatasetIndex": from_dataset_index,
                  "fromDatasetId": from_dataset_id,
                  "fromTransformResult": from_transform_result,
              }
          )
      else:
          self.options.update(
              dataset=[
                  {
                      "source": source,
                      "dimensions": dimensions,
                      "sourceHeader": source_header,
                      "transform": transform,
                      "fromDatasetIndex": from_dataset_index,
                      "fromDatasetId": from_dataset_id,
                      "fromTransformResult": from_transform_result,
                  }
              ]
          )
      return self
  
imports: from ..None import options
  from ..None import types
  from ..charts.base import Base
  from ..globals import RenderType, ThemeType, ToolTipFormatterType
  from ..types import Optional, Sequence
label_desc: Use image node_id 8 for calling the Chart obj's underlying member method code with example usage: obj.add_dataset(source, dimensions, source_header, transform, from_dataset_index, from_dataset_id, from_transform_result) and returns: self