code: def is_valid(x):
      """Check if a floating point number is valid"""
      if x is None:
          return False
      if isinstance(x, complex):
          return False
      return not math.isinf(x) and not math.isnan(x)
  
file_path: sympy/sympy/plotting/textplot.py
imports: from sympy.core.numbers import Float
  from sympy.core.symbol import Dummy
  from sympy.utilities.lambdify import lambdify
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: is_valid(x) and returns: unknown, False, False