code: def use_smartopen_features(
      path, features_dict=None, transport_params=None, read=True
  ):
      open = import_or_raise("smart_open", SMART_OPEN_ERR_MSG).open
      if read:
          with open(
              path,
              "r",
              encoding="utf-8",
              transport_params=transport_params,
          ) as f:
              features_dict = json.load(f)
              return features_dict
      else:
          with open(path, "w", transport_params=transport_params) as f:
              json.dump(features_dict, f)
  
imports: import json
  import shutil
  from featuretools.utils.gen_utils import import_or_raise
label_desc: Use image node_id 2 for calling a global function with example usage: use_smartopen_features(path, features_dict, transport_params, read) and returns: features_dict