code: def series_length(num, lengths):
      if num in lengths:
          return lengths[num]
      else:
          num2 = next_num(num)
          result = 1 + series_length(num2, lengths)
          lengths[num] = result
          return result
  
label_desc: Use image node_id 2 for calling a global function with example usage: series_length(num, lengths) and returns: lengths, result