code: def _check_search_args(search_args, legal_keys):
      search_arg_keys = set(search_args.keys())
      allkeys = set().union(*legal_keys)
      illegal_args = search_arg_keys.difference(allkeys)
      if len(illegal_args) > 0:
          invalidInputError(
              False, "Invalid Arguments found for 'search':"
          )
  
file_path: BigDL/python/nano/src/bigdl/nano/automl/hpo/search.py
imports: import optuna
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 5 for calling a global function with example usage: _check_search_args(search_args, legal_keys) without return types