code: def createPhoto(resolution):
          
          if resolution in PHOTO_QUALITIES:
              return MediaSettings(photoQuality=PHOTO_QUALITIES[resolution], photoResolution=resolution)
          else:
              raise BadRequest('Unexpected photo quality')
docs: Returns a :class:`~plexapi.sync.MediaSettings` object, based on provided photo quality value.
  
              Parameters:
                  resolution (str): maximum allowed resolution for synchronized photos, see PHOTO_QUALITY_* values in the
                                    module.
  
              Raises:
                  :class:`plexapi.exceptions.BadRequest` when provided unknown video quality.