code: def to_bool(val):
      if not val:
          val = 0
      else:
          try:
              val = int(val)
          except:
              val = 1
      return bool(val)
  
file_path: pyfasttext/setup.py
imports: from setuptools import setup, Extension
  from setuptools.command.build_ext import build_ext
  from Cython.Build import cythonize
  from glob import glob
  from os.path import join
  from subprocess import call
  import os
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: to_bool(val) and returns: bool