def get_uri(self, image):
        '''get the uri of an image, or the string (optional) that appears before
           ://. Optional. If none found, returns ''
        '''
        image = image or ''
        uri = ''

        match = re.match("^(?P<uri>.+)://", image)
        if match:
            uri = match.group('uri')

        return uri
def get_uri ( self , image ) : image = image or '' uri = '' match = re . match ( "^(?P<uri>.+)://" , image ) if match : uri = match . group ( 'uri' ) return uri
get the uri of an image, or the string (optional) that appears before
           ://. Optional. If none found, returns ''