def is_walrus(s3_url):
 if (s3_url is not None):
  o = urlparse.urlparse(s3_url)
  return (not o.hostname.endswith('amazonaws.com'))
 else:
  return False

def is_walrus ( s3_url ) : if ( s3_url is not None ) : o = urlparse . urlparse ( s3_url ) return ( not o . hostname . endswith ( 'amazonaws.com' ) ) else : return False
return true if its walrus endpoint .