def METHOD_NAME(self, name=None):
    """
    Return the residue field of the place along with the maps from
    and to it.
    INPUT:
    - ``name`` -- string; name of the generator of the residue field
    EXAMPLES::
        sage: F.<x> = FunctionField(GF(2))
        sage: O = F.maximal_order()
        sage: i = O.ideal(x^2 + x + 1)
        sage: p = i.place()
        sage: R, fr, to = p._residue_field()
        sage: R
        Finite Field in z2 of size 2^2
        sage: [fr(e) for e in R.list()]
        [0, x, x + 1, 1]
        sage: to(x*(x+1)) == to(x) * to(x+1)
        True
    """
    F = self.function_field()
    prime = self.prime_ideal()
    if self.is_infinite_place():
        K = F.constant_base_field()
        def from_K(e):
            return F(e)
        def to_K(f):
            n = f.numerator()
            d = f.denominator()
            n_deg = n.degree()
            d_deg = d.degree()
            if n_deg < d_deg:
                return K(0)
            elif n_deg == d_deg:
                return n.lc() / d.lc()
            else:
                raise TypeError("not in the valuation ring")
    else:
        O = F.maximal_order()
        K, from_K, _to_K = O.METHOD_NAME(prime, name=name)
        def to_K(f):
            if f in O: # f.denominator() is 1
                return _to_K(f.numerator())
            else:
                d = F(f.denominator())
                n = d * f
                nv = prime.valuation(O.ideal(n))
                dv = prime.valuation(O.ideal(d))
                if nv > dv:
                    return K(0)
                elif dv > nv:
                    raise TypeError("not in the valuation ring")
                s = ~prime.gen()
                rd = d * s**dv # in O but not in prime
                rn = n * s**nv # in O but not in prime
                return to_K(rn) / to_K(rd)
    return K, from_K, to_K