def METHOD_NAME(self, xp, dtype1, dtype2):
    x = xp.linspace(1, 20, 12, dtype=dtype1)
    condlist = [x > 15, x <= 5, x == 0, x == 10]
    funclist = xp.array([1, 0, 2, 3, 5], dtype=dtype2)
    return xp.piecewise(x, condlist, funclist)