<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_matplot_dict(self, option, prop, defdict):
 """Returns a copy of the settings dictionary for the specified option in curargs with update values where the value is replaced by the key from the relevant default dictionary. :arg option: the key in self.curargs to update. :arg defdict: the default dictionary whose keys should be used when values match. """

        cargs = self.curargs[option]
        result = cargs.copy()
        for varname in cargs:
            if prop in cargs[varname]:
                name = cargs[varname][prop]
                for key, val in list(defdict.items()):
                    if val == name:
                        cargs[varname][prop] = key
                        break

        return result