'shortcut for returning metadata with url information, if defined'

def _data_and_metadata(self):

    md = {}
    if self.url:
        md['url'] = self.url
    if md:
        return (self.data, md)
    else:
        return self.data
