code: def parse_http_scheme(uri):
      
      regex = re.compile(
          r'^(?:http)s?://',
          flags=re.IGNORECASE
      )
      match = regex.match(uri)
  
      return match.group(0) if match else 'http://'
docs: match on http scheme if no match is found will assume http