code: def _check_or_create_dir(directory: str) -> None:
      import tensorflow as tf
  
      """Checks if directory exists otherwise creates it."""
      if not tf.gfile.Exists(directory):
          tf.gfile.MakeDirs(directory)
  
imports: import math
  import os
  import random
  from typing import TYPE_CHECKING, Iterable, List, Mapping, Union, Tuple
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 5 for calling a global function with example usage: _check_or_create_dir(directory) without return types