code: def magic_number(n):
      """Checks if n is a magic number"""
      total_sum = 0
  
      # will end when n becomes 0
      # AND
      # sum becomes single digit.
      while n > 0 or total_sum > 9:
          # when n becomes 0 but we have a total_sum,
          # we update the value of n with the value of the sum digits
          if n == 0:
              n = total_sum  # only when sum of digits isn't single digit
              total_sum = 0
          total_sum += n % 10
          n //= 10
  
      # Return true if sum becomes 1
      return total_sum == 1
  
label_desc: Use image node_id 1 for calling a global function with example usage: magic_number(n) and returns: unknown