code: async def set_record(self, *, chat: typing.Union[str, int, None] = None, user: typing.Union[str, int, None] = None,
                           state=None, data=None, bucket=None):
          
          if data is None:
              data = {}
          if bucket is None:
              bucket = {}
  
          chat, user = self.check_address(chat=chat, user=user)
          addr = f"fsm:{chat}:{user}"
  
          record = {'state': state, 'data': data, 'bucket': bucket}
  
          conn = await self.redis()
          await conn.execute('SET', addr, json.dumps(record))
docs: Write record to storage
  
          :param bucket:
          :param chat:
          :param user:
          :param state:
          :param data:
          :return: