'Try to construct a ring from the given parameter.'

def _construct_ring(self, param, msg='Parameter    must    be    a    sequence    of    LinearRings    or    objects    that    can    initialize    to    LinearRings'):

    if isinstance(param, LinearRing):
        return param
    try:
        ring = LinearRing(param)
        return ring
    except TypeError:
        raise TypeError(msg)
