code: def attach_photo(self, photo: typing.Union[InputMediaPhoto, base.InputFile],
                       caption: base.String = None):
          
          if not isinstance(photo, InputMedia):
              photo = InputMediaPhoto(media=photo, caption=caption)
          self.attach(photo)
docs: Attach photo
  
          :param photo:
          :param caption: