docstr: Directory exists and is not empty,
  there is params.json in it, try to load it,
  raise exception because of fake params.json
docstr_tok: ["Directory","exists","and","is","not","empty",",","there","is","params.json","in","it",",","try","to","load","it",",","raise","exception","because","of","fake","params.json"]
code: def test_use_directory_if_non_empty_exists_with_params_json(self):
      """
      Directory exists and is not empty,
      there is params.json in it, try to load it,
      raise exception because of fake params.json
      """
      # Assert directory does not exist
      self.assertTrue(not os.path.exists(self.automl_dir))
      # Create dir
      os.mkdir(self.automl_dir)
      # Write `params.json` to directory
      open(os.path.join(self.automl_dir, "params.json"), "w").close()
      # Assert directory exists
      self.assertTrue(os.path.exists(self.automl_dir))
      # Generate data
      X, y = datasets.make_classification(n_samples=30)
      with self.assertRaises(AutoMLException) as context:
          a = AutoML(results_path=self.automl_dir)
          a.predict(X)  # AutoML tries to load on predict call
      self.assertTrue("Cannot load" in str(context.exception))
  
imports: import os
  import unittest
  import tempfile
  import json
  import numpy
  import pandas
  import shutil
  from sklearn import datasets
  from sklearn.pipeline import make_pipeline
  from sklearn.decomposition import PCA
  from supervised import AutoML
  from supervised.exceptions import AutoMLException
label_desc: Use image node_id 6 for calling the AutoMLTest obj's underlying member method code with example usage: obj.test_use_directory_if_non_empty_exists_with_params_json() without return types