def _get_value_for_attr(
        obj,
        cls,
        orig_cls,
        sig_key,
        sig,
        meta_hints,
        attr_getters,
        **kwargs):
    # Find a value for the attribute (with signature sig_key).
    if obj and sig_key in obj:
        # This argument is in obj.
        result = sig_key, _get_value_from_obj(obj, cls, sig, sig_key,
                                              meta_hints, **kwargs)
    elif sig_key in attr_getters:
        # There exists an attr_getter for this argument.
        attr_getter = attr_getters.pop(sig_key)
        result = sig_key, attr_getter()
    elif sig.default != inspect.Parameter.empty:
        # There is a default value for this argument.
        result = sig_key, sig.default
    elif sig.kind in (inspect.Parameter.VAR_POSITIONAL,
                      inspect.Parameter.VAR_KEYWORD):
        # This argument is either *args or **kwargs.
        result = None, None
    elif can_match_with_none(cls):
        # It is fine that there is no value.
        result = sig_key, None
    else:
        raise UnfulfilledArgumentError(
            'No value found for "{}"'.format(sig_key), sig_key, obj, orig_cls)
    return result
def _check_for_none(json_obj: object, cls: type):
    # Check if the json_obj is None and whether or not that is fine.
    if json_obj is None and not can_match_with_none(cls):
        cls_name = get_class_name(cls).lower()
        raise DeserializationError(
            message='NoneType cannot be deserialized into {}'.format(cls_name),
            source=json_obj,
            target=cls)