code: def _get_file(src):
      
      try:
          if '://' in src or src[0:2] == '//':  # Most likely this is remote file
              response = urllib2.urlopen(src)
              return response.read()
          else:
              with open(src, 'rb') as fh:
                  return fh.read()
      except Exception as e:
          raise RuntimeError('Error generating base64image: {}'.format(e))
docs: Return content from local or remote file.