code: def to_array(self):
          
          array = super(InputMediaPhoto, self).to_array()
          array['type'] = u(self.type)  # py2: type unicode, py3: type str
  
          array['media'] = u(self.media)  # py2: type unicode, py3: type str
  
          if self.caption is not None:
              array['caption'] = u(self.caption)  # py2: type unicode, py3: type str
  
          if self.parse_mode is not None:
              array['parse_mode'] = u(self.parse_mode)  # py2: type unicode, py3: type str
  
          return array
docs: Serializes this InputMediaPhoto to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict