def METHOD_NAME(self, input_data, expected_print):
    with tempfile.TemporaryDirectory() as tempdir:
        filename = os.path.join(tempdir, "test_stats.log")
        handler = logging.FileHandler(filename, mode="w")
        handler.setLevel(logging.INFO)
        name = "DataStats"
        logger = logging.getLogger(name)
        logger.addHandler(handler)
        input_param = {
            "keys": "img",
            "prefix": "test data",
            "data_shape": True,
            "value_range": True,
            "data_value": True,
            "additional_info": np.mean,
            "name": name,
        }
        transform = DataStatsd(**input_param)
        _ = transform(input_data)
        for h in logger.handlers[:]:
            h.close()
            logger.removeHandler(h)
        del handler
        with open(filename) as f:
            content = f.read()
        if sys.platform != "win32":
            self.assertEqual(content, expected_print)