class_docstr: Config for plots
class_docstr_tok: ["Config","for","plots"]
code: def __new__(
      cls, data: Dict[str, Any], plot_type: enum.Enum
  ) -> "AxPlotConfig":
      # Convert data to json-encodable form (strips out NamedTuple and numpy
      # array). This is a lossy conversion.
      dict_data = json.loads(
          json.dumps(
              named_tuple_to_dict(data), cls=utils.PlotlyJSONEncoder
          )
      )
      # pyre-fixme[7]: Expected `AxPlotConfig` but got `NamedTuple`.
      return super(AxPlotConfig, cls).__new__(cls, dict_data, plot_type)
  
imports: import enum
  import json
  from typing import Any, Dict, List, NamedTuple, Optional, Union
  from ax.core.types import TParameterization
  from ax.utils.common.serialization import named_tuple_to_dict
  from plotly import utils
label_desc: Use image node_id 1 for calling the AxPlotConfig obj's underlying member method code with example usage: obj.__new__(cls, data, plot_type) and returns: super