code: def _segment(cls, segment):
          
          return property(
              fget=lambda x: cls._get_segment(x, segment),
              fset=lambda x, v: cls._set_segment(x, segment, v),
          )
docs: Returns a property capable of setting and getting a segment.