code: def is_variable(tup):
      
      name, item = tup
      if callable(item):
          # function or class
          return False
  
      if isinstance(item, types.ModuleType):
          # imported module
          return False
  
      if name.startswith("_"):
          # private property
          return False
  
      return True
docs: Takes (name, object) tuple, returns True if it is a variable.