def METHOD_NAME(self, x: Any) -> Any:
    """
    Any preprocessing needed to be performed on function input.
    """
    if self.type == "index":
        return x
    elif self.type == "values":
        return self.samples[x]