def METHOD_NAME(self, estimator_instance, method):
    """Test expected return of methods that take sample-like argument."""
    if not _has_capability(estimator_instance, method):
        return None
    d = estimator_instance
    x = d.sample()
    res = getattr(estimator_instance, method)(x)
    _check_output_format(res, d, method)