async def add_pusher(self, user_id: str, access_token: Optional[int], kind: str, app_id: str, app_display_name: str, device_display_name: str, pushkey: str, lang: Optional[str], data: JsonDict, profile_tag: str='') -> Optional[Pusher]:
    'Creates a new pusher and adds it to the pool\n\n        Returns:\n            The newly created pusher.\n        '
    if (kind == 'email'):
        email_owner = (await self.store.get_user_id_by_threepid('email', canonicalise_email(pushkey)))
        if (email_owner != user_id):
            raise SynapseError(400, 'Email not found', Codes.THREEPID_NOT_FOUND)
    time_now_msec = self.clock.time_msec()
    last_stream_ordering = self.store.get_room_max_stream_ordering()
    self.pusher_factory.create_pusher(PusherConfig(id=None, user_name=user_id, access_token=access_token, profile_tag=profile_tag, kind=kind, app_id=app_id, app_display_name=app_display_name, device_display_name=device_display_name, pushkey=pushkey, ts=time_now_msec, lang=lang, data=data, last_stream_ordering=last_stream_ordering, last_success=None, failing_since=None))
    (await self.store.add_pusher(user_id=user_id, access_token=access_token, kind=kind, app_id=app_id, app_display_name=app_display_name, device_display_name=device_display_name, pushkey=pushkey, pushkey_ts=time_now_msec, lang=lang, data=data, last_stream_ordering=last_stream_ordering, profile_tag=profile_tag))
    pusher = (await self.start_pusher_by_id(app_id, pushkey, user_id))
    return pusher
Creates a new pusher and adds it to the pool

Returns:
    The newly created pusher.
async def add_pusher(self, user_id: str, access_token: Optional[int], kind: str, app_id: str, app_display_name: str, device_display_name: str, pushkey: str, lang: Optional[str], data: JsonDict, profile_tag: str=) -> Optional[Pusher]:
    'Creates a new pusher and adds it to the pool\n\n        Returns:\n            The newly created pusher.\n        '
    if (kind == 'email'):
        email_owner = (await self.store.get_user_id_by_threepid('email', canonicalise_email(pushkey)))
        if (email_owner != user_id):
            raise SynapseError(400, 'Email not found', Codes.THREEPID_NOT_FOUND)
    time_now_msec = self.clock.time_msec()
    last_stream_ordering = self.store.get_room_max_stream_ordering()
    self.pusher_factory.create_pusher(PusherConfig(id=None, user_name=user_id, access_token=access_token, profile_tag=profile_tag, kind=kind, app_id=app_id, app_display_name=app_display_name, device_display_name=device_display_name, pushkey=pushkey, ts=time_now_msec, lang=lang, data=data, last_stream_ordering=last_stream_ordering, last_success=None, failing_since=None))
    (await self.store.add_pusher(user_id=user_id, access_token=access_token, kind=kind, app_id=app_id, app_display_name=app_display_name, device_display_name=device_display_name, pushkey=pushkey, pushkey_ts=time_now_msec, lang=lang, data=data, last_stream_ordering=last_stream_ordering, profile_tag=profile_tag))
    pusher = (await self.start_pusher_by_id(app_id, pushkey, user_id))
    return pusher