def getEndpointsFromSegmentTable(segmentTable):
 endpoints = []
 segmentTableKeys = segmentTable.keys()
 segmentTableKeys.sort()
 for segmentTableKey in segmentTableKeys:
  for segment in segmentTable[segmentTableKey]:
   for endpoint in segment:
    endpoints.append(endpoint)
 return endpoints

def getEndpointsFromSegmentTable ( segmentTable ) : endpoints = [ ] segmentTableKeys = segmentTable . keys ( ) segmentTableKeys . sort ( ) for segmentTableKey in segmentTableKeys : for segment in segmentTable [ segmentTableKey ] : for endpoint in segment : endpoints . append ( endpoint ) return endpoints
get the endpoints from the segment table .