def METHOD_NAME(self):
    self.tmp_dir = tempfile.TemporaryDirectory()
    self.dict_file = osp.join(self.tmp_dir.name, 'fake_chars.txt')
    create_dummy_dict_file(self.dict_file)
    self.dict_cfg = dict(
        type='Dictionary',
        dict_file=self.dict_file,
        with_start=True,
        with_end=True,
        same_start_end=False,
        with_padding=False,
        with_unknown=False)
    # both max_seq_len has been set
    with self.assertWarns(Warning):
        ABIFuser(
            self.dict_cfg,
            max_seq_len=10,
            vision_decoder=dict(
                type='ABIVisionDecoder',
                in_channels=2,
                num_channels=2,
                max_seq_len=5),
            language_decoder=dict(
                type='ABILanguageDecoder',
                d_model=2,
                n_head=2,
                d_inner=16,
                n_layers=1,
                max_seq_len=5))
    # both dictionaries have been set
    with self.assertWarns(Warning):
        ABIFuser(
            self.dict_cfg,
            max_seq_len=10,
            vision_decoder=dict(
                type='ABIVisionDecoder',
                in_channels=2,
                num_channels=2,
                dictionary=self.dict_cfg),
            language_decoder=dict(
                type='ABILanguageDecoder',
                d_model=2,
                n_head=2,
                d_inner=16,
                n_layers=1,
                dictionary=self.dict_cfg))