<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_config(self, enabled):
 """Writes the configuration. This method can be overloaded to integrate with your application's own configuration mechanism. By default, a single 'status' file is written in the reports' directory, containing either ``ENABLED`` or ``DISABLED``; if the file doesn't exist, `UNSET` is assumed. :param enabled: Either `Stats.UNSET`, `Stats.DISABLED` or `Stats.ENABLED`. """

        status_file = os.path.join(self.location, 'status')
        with open(status_file, 'w') as fp:
            if enabled is Stats.ENABLED:
                fp.write('ENABLED')
            elif enabled is Stats.DISABLED:
                fp.write('DISABLED')
            else:
                raise ValueError("Unknown reporting state %r" % enabled)