def METHOD_NAME(self, inputs, state=()):
    """Preprocess either a tensor input or a TensorSpec.
    Args:
        inputs (TensorSpec or Tensor):
    Returns:
        Tensor or TensorSpec: if ``Tensor``, the returned is the preprocessed
            result; otherwise it's the tensor spec of the result.
    """
    assert state is (), \
        "The preprocessor is assumed to be stateless currently."
    ret = self._preprocess(inputs)
    return ret, state