nodes: 0, module; 1, function_definition; 2, function_name:load_projections; 3, parameters; 4, block; 5, identifier:projections_file; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, return_statement; 10, comment:"""
      Loads projections defined in the given `projections_file`.
  
      The `projections_file` is expected to be in the following format::
  
          old_label_1 | new_label_1
          old_label_1 old_label_2 | new_label_2
          old_label_3 |
  
      You can define one projection per line. Each projection starts with a list of one or multiple
      old labels (separated by a single whitespace) that are separated from the new label by a pipe
      (`|`). In the code above, the segment labeled with `old_label_1` will be labeled with
      `new_label_1` after applying the projection. Segments that are labeled with `old_label_1`
      **and** `old_label_2` concurrently are relabeled to `new_label_2`. All segments labeled with
      `old_label_3` are dropped. Combinations of multiple labels are automatically sorted in natural
      order.
  
      Args:
          projections_file (str): Path to the file with projections
  
      Returns:
          dict: Dictionary where the keys are tuples of labels to project to the key's value
  
      Example:
          >>> load_projections('/path/to/projections.txt')
          {('b',): 'foo', ('a', 'b'): 'a_b', ('a',): 'bar'}
      """; 11, assignment; 12, identifier:parts; 13, call; 14, block; 15, identifier:projections; 16, identifier:projections; 17, dictionary; 18, attribute; 19, argument_list; 20, expression_statement; 21, expression_statement; 22, expression_statement; 23, identifier:textfile; 24, identifier:read_separated_lines_generator; 25, identifier:projections_file; 26, string; 27, assignment; 28, assignment; 29, assignment; 30, string_content:|; 31, identifier:combination; 32, call; 33, identifier:new_label; 34, call; 35, subscript; 36, identifier:new_label; 37, identifier:tuple; 38, argument_list; 39, attribute; 40, argument_list; 41, identifier:projections; 42, identifier:combination; 43, call; 44, subscript; 45, identifier:strip; 46, identifier:sorted; 47, argument_list; 48, identifier:parts; 49, integer:1; 50, list_comprehension; 51, call; 52, for_in_clause; 53, attribute; 54, argument_list; 55, identifier:label; 56, call; 57, identifier:label; 58, identifier:strip; 59, attribute; 60, argument_list; 61, subscript; 62, identifier:split; 63, string; 64, identifier:parts; 65, integer:0; 66, string_content:
code: def load_projections(projections_file):
      """
      Loads projections defined in the given `projections_file`.
  
      The `projections_file` is expected to be in the following format::
  
          old_label_1 | new_label_1
          old_label_1 old_label_2 | new_label_2
          old_label_3 |
  
      You can define one projection per line. Each projection starts with a list of one or multiple
      old labels (separated by a single whitespace) that are separated from the new label by a pipe
      (`|`). In the code above, the segment labeled with `old_label_1` will be labeled with
      `new_label_1` after applying the projection. Segments that are labeled with `old_label_1`
      **and** `old_label_2` concurrently are relabeled to `new_label_2`. All segments labeled with
      `old_label_3` are dropped. Combinations of multiple labels are automatically sorted in natural
      order.
  
      Args:
          projections_file (str): Path to the file with projections
  
      Returns:
          dict: Dictionary where the keys are tuples of labels to project to the key's value
  
      Example:
          >>> load_projections('/path/to/projections.txt')
          {('b',): 'foo', ('a', 'b'): 'a_b', ('a',): 'bar'}
      """
      projections = {}
      for parts in textfile.read_separated_lines_generator(projections_file, '|'):
          combination = tuple(sorted([label.strip() for label in parts[0].split(' ')]))
          new_label = parts[1].strip()
  
          projections[combination] = new_label
  
      return projections