code: def _check_or_create_dir(directory: str):
      """Checks if directory exists otherwise creates it."""
      if not tf.gfile.Exists(directory):
          tf.gfile.MakeDirs(directory)
  
imports: from datetime import datetime
  import math
  import os
  import random
  from typing import Iterable, List, Mapping, Union, Tuple
  import sys
  import threading
  import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: _check_or_create_dir(directory) without return types