def METHOD_NAME(self):
    # file_client_args and backend_args can not be both set
    with pytest.raises(
            ValueError,
            match='"file_client_args" and "backend_args" cannot be set'):
        LoadImageFromFile(
            file_client_args={'backend': 'disk'},
            backend_args={'backend': 'disk'})
    data_prefix = osp.join(osp.dirname(__file__), '../data')
    results = dict(img_path=osp.join(data_prefix, 'color.jpg'))
    transform = LoadImageFromFile()
    results = transform(copy.deepcopy(results))
    assert results['img_path'] == osp.join(data_prefix, 'color.jpg')
    assert results['img'].shape == (300, 400, 3)
    assert results['img'].dtype == np.uint8
    assert results['img_shape'] == (300, 400)
    assert results['ori_shape'] == (300, 400)
    assert repr(transform) == transform.__class__.__name__ + \
        "(ignore_empty=False, to_float32=False, color_type='color', " + \
        "imdecode_backend='cv2', backend_args=None)"
    # to_float32
    transform = LoadImageFromFile(to_float32=True)
    results = transform(copy.deepcopy(results))
    assert results['img'].dtype == np.float32
    # gray image
    results = dict(img_path=osp.join(data_prefix, 'grayscale.jpg'))
    transform = LoadImageFromFile()
    results = transform(copy.deepcopy(results))
    assert results['img'].shape == (300, 400, 3)
    assert results['img'].dtype == np.uint8
    transform = LoadImageFromFile(color_type='unchanged')
    results = transform(copy.deepcopy(results))
    assert results['img'].shape == (300, 400)
    assert results['img'].dtype == np.uint8
    # test load empty
    fake_img_path = osp.join(data_prefix, 'fake.jpg')
    results['img_path'] = fake_img_path
    transform = LoadImageFromFile(ignore_empty=False)
    with pytest.raises(FileNotFoundError):
        transform(copy.deepcopy(results))
    transform = LoadImageFromFile(ignore_empty=True)
    assert transform(copy.deepcopy(results)) is None