def METHOD_NAME(self, context: Context) -> CheckResult:
    """Run check.
    Returns
    -------
    CheckResult
        with value of type pandas.DataFrame.
        Value contains two keys, 'train' - size of the train dataset
        and 'test' - size of the test dataset.
    Raises
    ------
    DeepchecksValueError
        if not dataset instances were provided.
        if datasets are empty.
    """
    train_dataset = context.train
    test_dataset = context.test
    sizes = {'Train': len(train_dataset), 'Test': len(test_dataset)}
    display = pd.DataFrame(sizes, index=['Size'])
    return CheckResult(
        value=sizes,
        display=display
    )