def METHOD_NAME(source):
  prefix_ok = False
  for prefix in valid_url_prefixes:
    if source.startswith(prefix):
      prefix_ok = True
      break
  if not prefix_ok:
    return False
  for suffix in valid_url_suffixes:
    if source.endswith(suffix):
      return True
  return False