<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def export_roles(self):
 """ Export the roles to one of the export types. """

        # prepare the report by removing unnecessary fields
        del self.report["state"]
        del self.report["stats"]
        for role in self.report["roles"]:
            del self.report["roles"][role]["state"]

            defaults_path = os.path.join(self.roles_path, role,
                                         "defaults", "main.yml")
            if os.path.exists(defaults_path):
                defaults = self.report["roles"][role]["defaults"]
                self.report["roles"][role]["defaults"] = \
                    utils.yaml_load("", defaults)

        Export(self.roles_path, self.report, self.config, self.options)