nodes: 0, module; 1, function_definition; 2, function_name:getPortSideView; 3, parameters; 4, type; 5, block; 6, identifier:self; 7, identifier:side; 8, generic_type; 9, expression_statement; 10, if_statement; 11, identifier:List; 12, type_parameter; 13, comment:"""
          Returns a sublist view for all ports of given side.
  
          :attention: Use this only after port sides are fixed!
  
          This is currently the case after running the {@link org.eclipse.elk.alg.layered.intermediate.PortListSorter}.
          Non-structural changes to this list are reflected in the original list. A structural modification is any
          operation that adds or deletes one or more elements; merely setting the value of an element is not a structural
          modification. Sublist indices can be cached using {@link LNode#cachePortSides()}.
  
          :param side: a port side
          :return: an iterable for the ports of given side
          """; 14, comparison_operator:side == PortSide.WEST; 15, block; 16, elif_clause; 17, elif_clause; 18, elif_clause; 19, else_clause; 20, type; 21, identifier:side; 22, attribute; 23, return_statement; 24, comparison_operator:side == PortSide.EAST; 25, block; 26, comparison_operator:side == PortSide.NORTH; 27, block; 28, comparison_operator:side == PortSide.SOUTH; 29, block; 30, block; 31, string:"LPort"; 32, identifier:PortSide; 33, identifier:WEST; 34, attribute; 35, identifier:side; 36, attribute; 37, return_statement; 38, identifier:side; 39, attribute; 40, return_statement; 41, identifier:side; 42, attribute; 43, return_statement; 44, raise_statement; 45, identifier:self; 46, identifier:west; 47, identifier:PortSide; 48, identifier:EAST; 49, attribute; 50, identifier:PortSide; 51, identifier:NORTH; 52, attribute; 53, identifier:PortSide; 54, identifier:SOUTH; 55, attribute; 56, call; 57, identifier:self; 58, identifier:east; 59, identifier:self; 60, identifier:north; 61, identifier:self; 62, identifier:south; 63, identifier:ValueError; 64, argument_list; 65, identifier:side
code: def getPortSideView(self, side) -> List["LPort"]:
          """
          Returns a sublist view for all ports of given side.
  
          :attention: Use this only after port sides are fixed!
  
          This is currently the case after running the {@link org.eclipse.elk.alg.layered.intermediate.PortListSorter}.
          Non-structural changes to this list are reflected in the original list. A structural modification is any
          operation that adds or deletes one or more elements; merely setting the value of an element is not a structural
          modification. Sublist indices can be cached using {@link LNode#cachePortSides()}.
  
          :param side: a port side
          :return: an iterable for the ports of given side
          """
          if side == PortSide.WEST:
              return self.west
          elif side == PortSide.EAST:
              return self.east
          elif side == PortSide.NORTH:
              return self.north
          elif side == PortSide.SOUTH:
              return self.south
          else:
              raise ValueError(side)