code: def delete_if_exists(filename):
      if os.path.exists(filename):
          if os.path.isdir(filename):
              shutil.rmtree(filename)
          else:
              os.remove(filename)
  
file_path: pipelinedp/examples/movie_view_ratings/common_utils.py
imports: from dataclasses import dataclass
  import os
  import shutil
  from typing import List, Any
  import apache_beam
label_desc: Use image node_id 6 for calling a global function with example usage: delete_if_exists(filename) without return types