code: def number_of_decimal_places(n):
      """
      Compute the number of decimal places in a number.
  
      Examples
      --------
      >>> number_of_decimal_places(1)
      0
      >>> number_of_decimal_places(3.14)
      2
      >>> number_of_decimal_places('3.14')
      2
      """
      decimal = Decimal(str(n))
      return -decimal.as_tuple().exponent
  
imports: from decimal import Decimal
  import math
  from numpy import isnan
label_desc: Use image node_id 4 for calling a global function with example usage: number_of_decimal_places(n) and returns: unknown