code: def test_dict_input_valid_checks_on_keys():
      match = "The dictionary keys are not all strings or "
      # User-defined keys
  
      class Hashable:
          def __init__(self, x: str, y: str):
              self.x = x
              self.y = y
  
          def __hash__(self):
              return hash((self.x, self.y))
  
          def __eq__(self, other):
              return (
                  isinstance(other, Hashable)
                  and self.x == other.x
                  and self.y == other.y
              )
  
      hash_obj_1 = Hashable("some", "custom")
      hash_obj_2 = Hashable("some", "other")
      custom_hashable_dict = {
          hash_obj_1: "value",
          hash_obj_2: "other_value",
      }
  
      with pytest.raises(MlflowException, match=match):
          _validate_input_dictionary_contains_only_strings_and_lists_of_strings(
              custom_hashable_dict
          )
  
      # keys are floats
      float_keys_dict = {1.1: "a", 2.2: "b"}
  
      with pytest.raises(MlflowException, match=match):
          _validate_input_dictionary_contains_only_strings_and_lists_of_strings(
              float_keys_dict
          )
  
      # keys are bool
      bool_keys_dict = {True: "a", False: "b"}
  
      with pytest.raises(MlflowException, match=match):
          _validate_input_dictionary_contains_only_strings_and_lists_of_strings(
              bool_keys_dict
          )
      # keys are tuples
      tuple_keys_dict = {("a", "b"): "a", ("a", "c"): "b"}
  
      with pytest.raises(MlflowException, match=match):
          _validate_input_dictionary_contains_only_strings_and_lists_of_strings(
              tuple_keys_dict
          )
  
      # keys are frozenset
      frozen_set_dict = {
          frozenset({"a", "b"}): "a",
          frozenset({"b", "c"}): "b",
      }
  
      with pytest.raises(MlflowException, match=match):
          _validate_input_dictionary_contains_only_strings_and_lists_of_strings(
              frozen_set_dict
          )
  
imports: import datetime
  import json
  import math
  import re
  import numpy
  import pandas
  import pyspark
  import pyspark.sql.types
  import pytest
  from scipy.sparse import csc_matrix, csr_matrix
  from mlflow.exceptions import MlflowException
  from mlflow.models.utils import _enforce_tensor_spec
  from mlflow.pyfunc import _parse_spark_datatype
  from mlflow.types import DataType
  from mlflow.types.schema import Array, ColSpec, Object, ParamSchema, ParamSpec, Property, Schema, TensorSpec
  from mlflow.types.utils import _get_tensor_shape, _infer_colspec_type, _infer_param_schema, _infer_schema, _validate_input_dictionary_contains_only_strings_and_lists_of_strings
label_desc: Use image node_id 20 for calling a global function with example usage: test_dict_input_valid_checks_on_keys() and returns: hash, unknown