'Set the SpatialReference for this geometry.'

def _set_srs(self, srs):

    if isinstance(srs, SpatialReference):
        srs_ptr = srs.ptr
    elif isinstance(srs, (int, str)):
        sr = SpatialReference(srs)
        srs_ptr = sr.ptr
    elif (srs is None):
        srs_ptr = None
    else:
        raise TypeError(('Cannot    assign    spatial    reference    with    object    of    type:    %s' % type(srs)))
    capi.assign_srs(self.ptr, srs_ptr)
