docs: def _classify(cls, response, objects):
          """Check the class _subtype_map for any child classes.
          We want to ignore any inherited _subtype_maps.
          Remove the polymorphic key from the initial data.
          """
          for subtype_key in cls.__dict__.get('_subtype_map', {}).keys():
              subtype_value = None
  
              rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
              subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
              if subtype_value:
                  # Try to match base class. Can be class name only
                  # (bug to fix in Autorest to support x-ms-discriminator-name)
                  if cls.__name__ == subtype_value:
                      return cls
                  flatten_mapping_type = cls._flatten_subtype(subtype_key, objects)
                  try:
                      return objects[flatten_mapping_type[subtype_value]]
                  except KeyError:
                      _LOGGER.warning(
                          "Subtype value %s has no mapping, use base class %s.",
                          subtype_value,
                          cls.__name__,
                      )
                      break
              else:
                  _LOGGER.warning(
                      "Discriminator %s is absent or null, use base class %s.",
                      subtype_key,
                      cls.__name__
                  )
                  break
          return cls