docs: def open(path_or_url):
      """
      Wrapper for opening an IO object to a local file or URL
      :param path_or_url:
      :return:
      """
      is_url = re.compile(
          r'^(?:http|ftp)s?://'  # http:// or https://
          r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'  # domain...
          r'localhost|'  # localhost...
          r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'  # ...or ip
          r'(?::\d+)?'  # optional port
          r'(?:/?|[/?]\S+)$', re.IGNORECASE)
  
      if re.match(is_url, path_or_url):
          return urllib.request.urlopen(path_or_url)
      else:
          return builtins.open(path_or_url)