nodes: 0, module; 1, function_definition; 2, function_name:get_levels; 3, parameters; 4, block; 5, identifier:self; 6, identifier:arcs; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""Calculate available arc height "levels".
          Used to calculate arrow heights dynamically and without wasting space.
  
          args (list): Individual arcs and their start, end, direction and label.
          RETURNS (list): Arc levels sorted from lowest to highest.
          """; 11, assignment; 12, call; 13, identifier:levels; 14, call; 15, identifier:sorted; 16, argument_list; 17, identifier:set; 18, argument_list; 19, call; 20, call; 21, identifier:list; 22, argument_list; 23, identifier:map; 24, argument_list; 25, identifier:levels; 26, lambda; 27, identifier:arcs; 28, lambda_parameters; 29, binary_operator:arc["end"] - arc["start"]; 30, identifier:arc; 31, subscript; 32, subscript; 33, identifier:arc; 34, string:"end"; 35, identifier:arc; 36, string:"start"
code: def get_levels(self, arcs):
          """Calculate available arc height "levels".
          Used to calculate arrow heights dynamically and without wasting space.
  
          args (list): Individual arcs and their start, end, direction and label.
          RETURNS (list): Arc levels sorted from lowest to highest.
          """
          levels = set(map(lambda arc: arc["end"] - arc["start"], arcs))
          return sorted(list(levels))