def _mediafile_image(image_path, maxwidth=None):
 with open(syspath(image_path), 'rb') as f:
  data = f.read()
 return mediafile.Image(data, type=mediafile.ImageType.front)

def _mediafile_image ( image_path , maxwidth = None ) : with open ( syspath ( image_path ) , 'rb' ) as f : data = f . read ( ) return mediafile . Image ( data , type = mediafile . ImageType . front )
return a mediafile .