def METHOD_NAME(self, *args, **kwargs):
    try:
        if self.has_single_func:
            return self.func(*args, **kwargs)
    except NotImplementedError:
        self.has_single_func = False
    if self.batch_func is not None:
        return self.batch_func([args], [kwargs])[0]
    raise NotImplementedError