def METHOD_NAME(tensor, order=2, axis=None):
    # handle difference in default axis notation
    if axis == ():
        axis = None
    if order == "inf":
        return np.max(np.abs(tensor), axis=axis)
    if order == 1:
        return np.sum(np.abs(tensor), axis=axis)
    elif order == 2:
        return np.sqrt(np.sum(tensor**2, axis=axis))
    else:
        return np.sum(np.abs(tensor) ** order, axis=axis) ** (1 / order)