<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_expectations_config(self, discard_failed_expectations=True, discard_result_format_kwargs=True, discard_include_configs_kwargs=True, discard_catch_exceptions_kwargs=True, suppress_warnings=False ):
 """Returns _expectation_config as a JSON object, and perform some cleaning along the way. Args: discard_failed_expectations (boolean):
 \ Only include expectations with success_on_last_run=True in the exported config. Defaults to `True`. discard_result_format_kwargs (boolean):
 \ In returned expectation objects, suppress the `result_format` parameter. Defaults to `True`. discard_include_configs_kwargs (boolean):
 \ In returned expectation objects, suppress the `include_configs` parameter. Defaults to `True`. discard_catch_exceptions_kwargs (boolean):
 \ In returned expectation objects, suppress the `catch_exceptions` parameter. Defaults to `True`. Returns: An expectation config. Note: get_expectations_config does not affect the underlying config at all. The returned config is a copy of _expectations_config, not the original object. """

        config = dict(self._expectations_config)
        config = copy.deepcopy(config)
        expectations = config["expectations"]

        discards = defaultdict(int)

        if discard_failed_expectations:
            new_expectations = []

            for expectation in expectations:
                # Note: This is conservative logic.
                # Instead of retaining expectations IFF success==True, it discard expectations IFF success==False.
                # In cases where expectation["success"] is missing or None, expectations are *retained*.
                # Such a case could occur if expectations were loaded from a config file and never run.
                if "success_on_last_run" in expectation and expectation["success_on_last_run"] == False:
                    discards["failed_expectations"] += 1
                else:
                    new_expectations.append(expectation)

            expectations = new_expectations

        for expectation in expectations:
            # FIXME: Factor this out into a new function. The logic is duplicated in remove_expectation, which calls _copy_and_clean_up_expectation
            if "success_on_last_run" in expectation:
                del expectation["success_on_last_run"]

            if discard_result_format_kwargs:
                if "result_format" in expectation["kwargs"]:
                    del expectation["kwargs"]["result_format"]
                    discards["result_format"] += 1

            if discard_include_configs_kwargs:
                if "include_configs" in expectation["kwargs"]:
                    del expectation["kwargs"]["include_configs"]
                    discards["include_configs"] += 1

            if discard_catch_exceptions_kwargs:
                if "catch_exceptions" in expectation["kwargs"]:
                    del expectation["kwargs"]["catch_exceptions"]
                    discards["catch_exceptions"] += 1

        if not suppress_warnings:
            """
WARNING: get_expectations_config discarded
    12 failing expectations
    44 result_format kwargs
     0 include_config kwargs
     1 catch_exceptions kwargs
If you wish to change this behavior, please set discard_failed_expectations, discard_result_format_kwargs, discard_include_configs_kwargs, and discard_catch_exceptions_kwargs appropirately.
            """
            if any([discard_failed_expectations, discard_result_format_kwargs, discard_include_configs_kwargs, discard_catch_exceptions_kwargs]):
                print("WARNING: get_expectations_config discarded")
                if discard_failed_expectations:
                    print("\t%d failing expectations" %
                          discards["failed_expectations"])
                if discard_result_format_kwargs:
                    print("\t%d result_format kwargs" %
                          discards["result_format"])
                if discard_include_configs_kwargs:
                    print("\t%d include_configs kwargs" %
                          discards["include_configs"])
                if discard_catch_exceptions_kwargs:
                    print("\t%d catch_exceptions kwargs" %
                          discards["catch_exceptions"])
                print("If you wish to change this behavior, please set discard_failed_expectations, discard_result_format_kwargs, discard_include_configs_kwargs, and discard_catch_exceptions_kwargs appropirately.")

        config["expectations"] = expectations
        return config