code: def _normalize_tz(val):
    
    match = _TZ_RE.match(val)
    if match:
      ts, tz = match.groups()
      if len(tz) == 5:
        # If the length of the tz is 5 then it is of the form (+|-)dddd, which is exactly what python
        # wants, so just return it.
        return ts + tz
      if len(tz) == 6:
        # If the length of the tz is 6 then it is of the form (+|-)dd:dd, just remove the colon
        return ts + tz[:3] + tz[4:]
      if tz == "Z" or tz == "z":
        # If the tz is "Z" or 'z', return a timezone of +0000
        return ts + "+0000"
      else:
        # Otherwise, the timzone must be of the format (+|-)dd, in which case we just need to add two
        # "0" to it, and it will be in the proper format.
        return ts + tz + "00"
    else:
      return val
docs: Normalizes all valid ISO8601 time zone variants to the one python will
    parse.
  
    :val: a timestamp string without a timezone, or with a timezone in one of the ISO8601 accepted
          formats.