code: def set_chat_photo(self, chat_id, photo):
          
          from pytgbot.api_types.sendable.files import InputFile
          
          assert_type_or_raise(chat_id, (int, unicode_type), parameter_name="chat_id")
          
          assert_type_or_raise(photo, InputFile, parameter_name="photo")
          
          result = self.do("setChatPhoto", chat_id=chat_id, photo=photo)
          if self.return_python_objects:
              logger.debug("Trying to parse {data}".format(data=repr(result)))
              try:
                  return from_array_list(bool, result, list_level=0, is_builtin=True)
              except TgApiParseException:
                  logger.debug("Failed parsing as primitive bool", exc_info=True)
              # end try
              # no valid parsing so far
              raise TgApiParseException("Could not parse result.")  # See debug log for details!
          # end if return_python_objects
          return result
docs: Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success. 
  
          Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’ setting is off in the target group.
  
  
          https://core.telegram.org/bots/api#setchatphoto
  
          
          Parameters:
          
          :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
          :type  chat_id: int | str|unicode
          
          :param photo: New chat photo, uploaded using multipart/form-data
          :type  photo: pytgbot.api_types.sendable.files.InputFile
          
          
          Returns:
  
          :return: Returns True on success
          :rtype:  bool