# Path: model_card_toolkit/model_card.py
# class Owner(BaseModelCardField):
# class Version(BaseModelCardField):
# class License(BaseModelCardField):
# class Reference(BaseModelCardField):
# class Citation(BaseModelCardField):
# class ModelDetails(BaseModelCardField):
# class Graphic(BaseModelCardField):
# class GraphicsCollection(BaseModelCardField):
# class SensitiveData(BaseModelCardField):
# class Dataset(BaseModelCardField):
# class KeyVal(BaseModelCardField):
# class ModelParameters(BaseModelCardField):
# class ConfidenceInterval(BaseModelCardField):
# class PerformanceMetric(BaseModelCardField):
# class QuantitativeAnalysis(BaseModelCardField):
# class User(BaseModelCardField):
# class UseCase(BaseModelCardField):
# class Limitation(BaseModelCardField):
# class Tradeoff(BaseModelCardField):
# class Risk(BaseModelCardField):
# class Considerations(BaseModelCardField):
# class ModelCard(BaseModelCardField):
#   def to_json(self) -> str:
#   def from_json(self, json_dict: Dict[str, Any]) -> None:
#   def merge_from_json(self, json: Union[Dict[str, Any], str]) -> None:
# 
# Path: model_card_toolkit/utils/graphics.py
# _COLOR_PALETTE = {
#     'material_cyan_700': '#129EAF',  # default
#     'material_teal_700': '#00897B',  # training dataset
#     'material_indigo_400': '#5C6BC0',  # eval dataset
#     'material_purple_500': '#A142F4'  # quantitative analysis
# }
# class _Graph():
# def annotate_dataset_feature_statistics_plots(
#     model_card: model_card_module.ModelCard,
#     data_stats: Sequence[statistics_pb2.DatasetFeatureStatisticsList]) -> None:
# def annotate_eval_result_plots(model_card: model_card_module.ModelCard,
#                                eval_result: tfma.EvalResult) -> None:
# def _extract_graph_data_from_dataset_feature_statistics(
#     feature_stats: statistics_pb2.FeatureNameStatistics,
#     color: Optional[str] = None) -> Union[_Graph, None]:
# def _extract_graph_data_from_slicing_metrics(
#     slicing_metrics: Sequence[tfma.view.SlicedMetrics],
#     metric: str,
#     slices_key: str = '',
#     output_name: str = '',
#     sub_key: str = '',
# ) -> Optional[_Graph]:
# def _draw_histogram(graph: _Graph) -> Optional[_Graph]:
# def figure_to_base64str(fig: matplotlib.figure.Figure) -> str:
# def stringify_slice_key(slice_key: SliceKeyType) -> Tuple[str, str]:


import logging
import tensorflow_model_analysis as tfma
from absl.testing import absltest
from absl.testing import parameterized
from model_card_toolkit import model_card as model_card_module
from model_card_toolkit.utils import graphics
from google.protobuf import text_format
from tensorflow_metadata.proto.v0 import statistics_pb2
              sample_count: 40.0
            }
            buckets {
              label: '2014-11-06'
              sample_count: 37.0
            }
          }
        }
      }
      features {
        path {
          step: "slug"
        }
        type: STRING
        string_stats {
          rank_histogram {
            buckets {
              label: 'zynga-q3-earnings'
              sample_count: 1.0
            }
            buckets {
              label: 'zumba-ad'
              sample_count: 1.0
            }
          }
        }
      }
    }
    """, statistics_pb2.DatasetFeatureStatisticsList())


# Path: model_card_toolkit/model_card.py
# class Owner(BaseModelCardField):
# class Version(BaseModelCardField):
# class License(BaseModelCardField):
# class Reference(BaseModelCardField):
# class Citation(BaseModelCardField):
# class ModelDetails(BaseModelCardField):
# class Graphic(BaseModelCardField):
# class GraphicsCollection(BaseModelCardField):
# class SensitiveData(BaseModelCardField):
# class Dataset(BaseModelCardField):
# class KeyVal(BaseModelCardField):
# class ModelParameters(BaseModelCardField):
# class ConfidenceInterval(BaseModelCardField):
# class PerformanceMetric(BaseModelCardField):
# class QuantitativeAnalysis(BaseModelCardField):
# class User(BaseModelCardField):
# class UseCase(BaseModelCardField):
# class Limitation(BaseModelCardField):
# class Tradeoff(BaseModelCardField):
# class Risk(BaseModelCardField):
# class Considerations(BaseModelCardField):
# class ModelCard(BaseModelCardField):
#   def to_json(self) -> str:
#   def from_json(self, json_dict: Dict[str, Any]) -> None:
#   def merge_from_json(self, json: Union[Dict[str, Any], str]) -> None:
# 
# Path: model_card_toolkit/utils/graphics.py
# _COLOR_PALETTE = {
#     'material_cyan_700': '#129EAF',  # default
#     'material_teal_700': '#00897B',  # training dataset
#     'material_indigo_400': '#5C6BC0',  # eval dataset
#     'material_purple_500': '#A142F4'  # quantitative analysis
# }
# class _Graph():
# def annotate_dataset_feature_statistics_plots(
#     model_card: model_card_module.ModelCard,
#     data_stats: Sequence[statistics_pb2.DatasetFeatureStatisticsList]) -> None:
# def annotate_eval_result_plots(model_card: model_card_module.ModelCard,
#                                eval_result: tfma.EvalResult) -> None:
# def _extract_graph_data_from_dataset_feature_statistics(
#     feature_stats: statistics_pb2.FeatureNameStatistics,
#     color: Optional[str] = None) -> Union[_Graph, None]:
# def _extract_graph_data_from_slicing_metrics(
#     slicing_metrics: Sequence[tfma.view.SlicedMetrics],
#     metric: str,
#     slices_key: str = '',
#     output_name: str = '',
#     sub_key: str = '',
# ) -> Optional[_Graph]:
# def _draw_histogram(graph: _Graph) -> Optional[_Graph]:
# def figure_to_base64str(fig: matplotlib.figure.Figure) -> str:
# def stringify_slice_key(slice_key: SliceKeyType) -> Tuple[str, str]:


# Path: model_card_toolkit/utils/graphics_test.py
import logging
import tensorflow_model_analysis as tfma
from absl.testing import absltest
from absl.testing import parameterized
from model_card_toolkit import model_card as model_card_module
from model_card_toolkit.utils import graphics
from google.protobuf import text_format
from tensorflow_metadata.proto.v0 import statistics_pb2

              sample_count: 40.0
            }
            buckets {
              label: '2014-11-06'
              sample_count: 37.0
            }
          }
        }
      }
      features {
        path {
          step: "slug"
        }
        type: STRING
        string_stats {
          rank_histogram {
            buckets {
              label: 'zynga-q3-earnings'
              sample_count: 1.0
            }
            buckets {
              label: 'zumba-ad'
              sample_count: 1.0
            }
          }
        }
      }
    }
    """, statistics_pb2.DatasetFeatureStatisticsList())


    model_card = model_card_module.ModelCard()