code: def from_file(cls, filename, verbose, log):
      # type: (str, bool, logging.Logger) -> UploadProgressReport
      total_size_mb = float(os.path.getsize(filename)) / (
          1024.0 * 1024.0
      )
      return UploadProgressReport(filename, verbose, total_size_mb, log)
  
imports: import logging
  import os
  from time import time
  from typing import Optional, AnyStr, IO
  from ..config import config
label_desc: Use image node_id 4 for calling the UploadProgressReport obj's underlying member method code with example usage: obj.from_file(cls, filename, verbose, log) and returns: UploadProgressReport