code: def _assert_valid_categorical_missing_value(value):
      
      label_types = LabelArray.SUPPORTED_SCALAR_TYPES
      if not isinstance(value, label_types):
          raise TypeError(
              "Categorical terms must have missing values of type "
              "{types}.".format(
                  types=' or '.join([t.__name__ for t in label_types]),
              )
          )
docs: Check that value is a valid categorical missing_value.
  
      Raises a TypeError if the value is cannot be used as the missing_value for
      a categorical_dtype Term.