def METHOD_NAME(tensor, order=None, axis=None):
    # pytorch does not accept `None` for any keyword arguments. additionally,
    # pytorch doesn't seems to support keyword arguments in the first place
    kwds = {}
    if axis is not None:
        kwds["dim"] = axis
    if order and order != "inf":
        kwds["p"] = order
    if order == "inf":
        res = torch.max(torch.abs(tensor), **kwds)
        if axis is not None:
            return res[0]  # ignore indices output
        return res
    return torch.METHOD_NAME(tensor, **kwds)