code: def resource_event(self, filename):
      if self.fs.exists(filename=filename):
          md5hash = get_digest(filename)
          if self.fs.exists(filename=filename, md5=md5hash):
              resource = (filename, md5hash)
              if resource not in self.run_entry["resources"]:
                  self.run_entry["resources"].append(resource)
                  self.save()
              return
      # Pymongo 4.0: GridFS removed support for md5, we now have to compute
      # it manually
      md5hash = get_digest(filename)
      self.run_entry["resources"].append((filename, md5hash))
      self.save()
  
imports: from typing import Optional, Union
  import mimetypes
  import os.path
  import pickle
  import re
  import sys
  import time
  from tempfile import NamedTemporaryFile
  import warnings
  import sacred.optional
  from sacred.commandline_options import cli_option
  from sacred.dependencies import get_digest
  from sacred.observers.base import RunObserver
  from sacred.observers.queue import QueueObserver
  from sacred.serializer import flatten
  from sacred.utils import ObserverError, PathType
  import pkg_resources
label_desc: Use image node_id 11 for calling the MongoObserver obj's underlying member method code with example usage: obj.resource_event(filename) without return types