code: def format_repeated_pair_list(self, key, root_list, level):
          
  
          lines = []
  
          def depth(L):
              return isinstance(L, (tuple, list)) and max(map(depth, L)) + 1
  
          if depth(root_list) == 2:
              # single set of points only
              root_list = [root_list]
  
          for pair_list in root_list:
              lines += self.format_pair_list(key, pair_list, level)
  
          return lines
docs: Process (possibly) repeated lists of pairs e.g. POINTs blocks