code: def __valid_url(cls, url):
          
          bits = urlparse(url)
          return ((bits.scheme == "http" or bits.scheme == "https") and
                  _PATTERN_URL_PART.match(bits.netloc) and
                  _PATTERN_URL_PART.match(bits.path))
docs: Expects input to already be a valid string