code: def get_categorical_numeric_feature_types(
      schema: schema_pb2.Schema,
  ) -> Mapping[types.FeaturePath, "schema_pb2.FeatureType"]:
      """Get a mapping of numeric categorical features to their schema type.
  
      Args:
        schema: The schema for the data.
  
      Returns:
        A map from feature path of numeric features that should be considered
        categorical to their schema type.
  
      Raises:
        ValueError: If a feature path is duplicated within the schema and
        associated with more than one type.
      """
      categorical_numeric_types = {}
      for feature_path, feature in get_all_leaf_features(schema):
          if (
              feature_path in categorical_numeric_types
              and categorical_numeric_types[feature_path]
              != feature.type
          ):
              raise ValueError(
                  "Schema contains inconsistently typed duplicates for %s"
                  % feature_path
              )
          if feature.type in (
              schema_pb2.INT,
              schema_pb2.FLOAT,
          ) and is_categorical_feature(feature):
              categorical_numeric_types[feature_path] = feature.type
      return categorical_numeric_types
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import logging
  from typing import Any, Iterable, List, Mapping, Optional, Set, Text, Tuple, Union
  from tensorflow_data_validation import types
  from tensorflow_data_validation.utils import io_util
  from google.protobuf import descriptor
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 9 for calling a global function with example usage: get_categorical_numeric_feature_types(schema) and returns: categorical_numeric_types