'Reduces the atom to an affine expression and list of constraints.
Parameters
arg_objs : list
LinExpr for each argument.
size : tuple
The size of the resulting expression.
data :
Additional data required by the atom.
Returns
tuple
(LinOp for objective, list of constraints)'

@staticmethod
def graph_implementation(arg_objs, size, data=None):

    x = arg_objs[0]
    (p, w) = data
    if (p == 1):
        return (x, [])
    else:
        one = lu.create_const(np.mat(np.ones(size)), size)
        if (p == 0):
            return (one, [])
        else:
            t = lu.create_var(size)
            if (0 < p < 1):
                return (t, gm_constrs(t, [x, one], w))
            elif (p > 1):
                return (t, gm_constrs(x, [t, one], w))
            elif (p < 0):
                return (t, gm_constrs(one, [x, t], w))
            else:
                raise NotImplementedError('this    power    is    not    yet    supported.')
