Creates a new inline result of photo type.

        Args:
            file (`obj`, optional):
                Same as ``file`` for `client.send_file
                <telethon.client.uploads.UploadMethods.send_file>`.

async def photo(
            self, file, *, id=None,
            text=None, parse_mode=(), link_preview=True,
            geo=None, period=60, contact=None, game=False, buttons=None
    ):
        """
        Creates a new inline result of photo type.

        Args:
            file (`obj`, optional):
                Same as ``file`` for `client.send_file
                <telethon.client.uploads.UploadMethods.send_file>`.
        """
        try:
            fh = utils.get_input_photo(file)
        except TypeError:
            fh = await self._client.upload_file(file, use_cache=types.InputPhoto)

        if not isinstance(fh, types.InputPhoto):
            r = await self._client(functions.messages.UploadMediaRequest(
                types.InputPeerSelf(), media=types.InputMediaUploadedPhoto(fh)
            ))
            fh = utils.get_input_photo(r.photo)

        result = types.InputBotInlineResultPhoto(
            id=id or '',
            type='photo',
            photo=fh,
            send_message=await self._message(
                text=text or '',
                parse_mode=parse_mode,
                link_preview=link_preview,
                geo=geo,
                period=period,
                contact=contact,
                game=game,
                buttons=buttons
            )
        )
        if id is None:
            result.id = hashlib.sha256(bytes(result)).hexdigest()

        return result