<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_value(v, parser, config, description):
 """ Convert a string received on the command-line into a value or None. :param str v: The value to parse. :param parser: The fallback callable to load the value if loading from scheme fails. :param dict config: The config to use. :param str description: Description (for debugging) :return: The parsed value :rtype: object """

    val = None

    if v == '':
        return

    if v is not None:
        try:
            val = load_value_from_schema(v)
        except Exception as e:
            six.raise_from(
                CertifierTypeError(
                    message='{kind}'.format(
                        description=description,
                        kind=type(v).__name__,
                    ),
                    required=config['required'],
                    value=v,
                ),
                e)
        else:
            if val is None:
                try:
                    return parser(v)
                except CertifierTypeError:
                    raise
                except CertifierValueError:
                    raise
                except TypeError as e:
                    six.raise_from(
                        CertifierTypeError(
                            message='{kind}'.format(
                                description=description,
                                kind=type(v).__name__,
                            ),
                            required=config['required'],
                            value=v,
                        ),
                        e)
                except ValueError as e:
                    six.raise_from(
                        CertifierValueError(
                            message='{value}'.format(
                                description=description,
                                value=v,
                            ),
                            required=config['required'],
                            value=v,
                        ),
                        e)

    return val