docs: def _build_attribute_modifiers(var, attribute_mapping, ignore=None):
      """ Handles adding schema modifiers for a given config var and some mapping.
  
      :param attr._make.Attribute var: The config var to build modifiers for
      :param Dict[str, str] attribute_mapping: A mapping of attribute to jsonschema
          modifiers
      :param List[str] ignore: A list of mapping keys to ignore, defaults to None
      :raises ValueError: When the given ``var`` is not an config var
      :raises ValueError: When jsonschema modifiers are given the wrong type
      :return: A dictionary of the built modifiers
      :rtype: Dict[str, Any]
      """
  
      if not isinstance(ignore, list):
          ignore = ["type", "name", "required", "default"]
      if not is_config_var(var):
          raise ValueError(
              f"cannot build field modifiers for {var!r}, is not a config var"
          )
  
      entry = var.metadata[CONFIG_KEY]
      modifiers = {}
  
      for (entry_attribute, entry_value) in zip(
          attr.fields(type(entry)), attr.astuple(entry)
      ):
          if entry_value is not None:
              if entry_attribute.name in ignore:
                  continue
              elif entry_attribute.name in attribute_mapping:
                  # NOTE: stupid type comparisons required for off case where
                  # bool is a subclass of int `isinstance(True, (int, float)) == True`
                  if entry_attribute.type is not None and (
                      type(entry_value) in entry_attribute.type
                      if isinstance(entry_attribute.type, (list, tuple, set))
                      else type(entry_value) == entry_attribute.type
                  ):  # noqa
                      modifiers[attribute_mapping[entry_attribute.name]] = entry_value
                  else:
                      raise ValueError(
                          f"invalid modifier type for modifier {entry_attribute.name!r} "
                          f"on var {var.name!r}, expected type {entry_attribute.type!r}, "
                          f"received {entry_value!r} of type {type(entry_value)!r}"
                      )
              else:
                  warnings.warn(
                      f"field modifier {entry_attribute.name!r} has no effect on var "
                      f"{var.name!r} of type {entry.type!r}"
                  )
  
      return modifiers