code: def get_dir_size(path: str):
      total = 0
      with os.scandir(path) as it:
          for entry in it:
              if entry.is_file():
                  total += entry.stat().st_size
              elif entry.is_dir():
                  total += get_dir_size(entry.path)
      return total
  
imports: import os
  import io
  import shutil
  import tarfile
  import hashlib
  from pathlib import Path
  from abc import ABC, abstractmethod
  from typing import Union, Optional
  from dataclasses import dataclass
  from datetime import datetime
  import threading
  import psutil
  from checksumdir import dirhash
  from mindsdb.utilities.config import Config
  from mindsdb.utilities.context import context
  import mindsdb.utilities.profiler
  from mindsdb.utilities import log
label_desc: Use image node_id 2 for calling a global function with example usage: get_dir_size(path) and returns: total