code: def _get_dir_size(path):
      """Calculate the size of a directory"""
      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
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/utils/uploader.py
imports: from __future__ import absolute_import
  import logging
  import os
  import tempfile
  import botocore
  import boto3
  import tqdm
  from sagemaker.session import Session
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.s3 import S3Uploader
  from sagemaker.utils import create_tar_file
label_desc: Use image node_id 1 for calling a global function with example usage: _get_dir_size(path) and returns: total