class_docstr: Options for generating statistics.
class_docstr_tok: ["Options","for","generating","statistics","."]
docstr: Construct an instance of stats options from a JSON representation.
  
  Args:
    options_json: A JSON representation of the __dict__ attribute of a
      StatsOptions instance.
  
  Returns:
    A StatsOptions instance constructed by setting the __dict__ attribute to
    the deserialized value of options_json.
docstr_tok: ["Construct","an","instance","of","stats","options","from","a","JSON","representation",".","Args",":","options_json",":","A","JSON","representation","of","the","__dict__","attribute","of","a","StatsOptions","instance",".","Returns",":","A","StatsOptions","instance","constructed","by","setting","the","__dict__","attribute","to","the","deserialized","value","of","options_json","."]
code: def from_json(cls, options_json: Text) -> "StatsOptions":
      """Construct an instance of stats options from a JSON representation.
  
      Args:
        options_json: A JSON representation of the __dict__ attribute of a
          StatsOptions instance.
  
      Returns:
        A StatsOptions instance constructed by setting the __dict__ attribute to
        the deserialized value of options_json.
      """
      options_dict = json.loads(options_json)
      type_name = options_dict.pop(_TYPE_NAME_KEY, None)
      if type_name is not None and type_name != "StatsOptions":
          raise ValueError("JSON does not encode a StatsOptions")
      if _SCHEMA_JSON_KEY in options_dict:
          options_dict["_schema"] = json_format.Parse(
              options_dict[_SCHEMA_JSON_KEY], schema_pb2.Schema()
          )
          del options_dict[_SCHEMA_JSON_KEY]
      if _SLICING_CONFIG_JSON_KEY in options_dict:
          options_dict["_slicing_config"] = json_format.Parse(
              options_dict[_SLICING_CONFIG_JSON_KEY],
              slicing_spec_pb2.SlicingConfig(),
          )
          del options_dict[_SLICING_CONFIG_JSON_KEY]
      per_feature_weight_override_json = options_dict.get(
          _PER_FEATURE_WEIGHT_OVERRIDE_JSON_KEY
      )
      if per_feature_weight_override_json is not None:
          options_dict["_per_feature_weight_override"] = {
              types.FeaturePath.from_json(k): v
              for k, v in per_feature_weight_override_json.items()
          }
          del options_dict[_PER_FEATURE_WEIGHT_OVERRIDE_JSON_KEY]
      options = cls()
      options.__dict__ = options_dict
      return options
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import json
  import logging
  import types
  from typing import Dict, List, Optional, Text, Union
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import example_weight_map
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import slicing_util
  from tfx_bsl.arrow import sql_util
  from tfx_bsl.coders import example_coder
  from tfx_bsl.public.proto import slicing_spec_pb2
  from google.protobuf import json_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling the StatsOptions obj's underlying member method code with example usage: obj.from_json(cls, options_json) and returns: options