<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_resource(self, filename):
 """Add a file as a resource. In Sacred terminology a resource is a file that the experiment needed to access during a run. In case of a MongoObserver that means making sure the file is stored in the database (but avoiding duplicates) along its path and md5 sum. See also :py:meth:`sacred.Experiment.add_resource`. Parameters filename : str name of the file to be stored as a resource """

        filename = os.path.abspath(filename)
        self._emit_resource_added(filename)