code: def check_type(lineno, type_list, arg):
      
      if not isinstance(type_list, list):
          type_list = [type_list]
  
      if arg.type_ in type_list:
          return True
  
      if len(type_list) == 1:
          syntax_error(lineno, "Wrong expression type '%s'. Expected '%s'" %
                       (arg.type_, type_list[0]))
      else:
          syntax_error(lineno, "Wrong expression type '%s'. Expected one of '%s'"
                       % (arg.type_, tuple(type_list)))
  
      return False
docs: Check arg's type is one in type_list, otherwise,
      raises an error.