'Construct a polynomial from a ``list``.'

@classmethod
def _from_list(cls, rep, opt):

    gens = opt.gens
    if (not gens):
        raise GeneratorsNeeded("can't    initialize    from    'list'    without    generators")
    elif (len(gens) != 1):
        raise MultivariatePolynomialError("'list'    representation    not    supported")
    level = (len(gens) - 1)
    domain = opt.domain
    if (domain is None):
        (domain, rep) = construct_domain(rep, opt=opt)
    else:
        rep = list(map(domain.convert, rep))
    return cls.new(DMP.from_list(rep, level, domain), *gens)
