Added documentation headers in segment.py