<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_header_tags():
 """Parse tags specified in the HTTP request header."""

    # Get the value of the custom HTTP header and interpret it as an query
    # string
    qs = request.headers.get(
        current_app.config['FILES_REST_FILE_TAGS_HEADER'], '')

    tags = {}
    for key, value in parse_qsl(qs):
        # Check for duplicate keys
        if key in tags:
            raise DuplicateTagError()
        # Check for too short/long keys and values.
        if not validate_tag(key, value):
            raise InvalidTagError()
        tags[key] = value
    return tags or None