class_docstr: A class to load, modify, and display the StreamAlertCLI Config
docstr: Toggle CloudWatch metric logging and filter creation
  
  Args:
      enabled (bool): False if disabling metrics, true if enable_logging
      clusters (list): Clusters to enable or disable metrics on
      lambda_functions (list): Which lambda functions to enable or disable
          metrics on (rule, alert, or athena)
docstr_tok: ["Toggle","CloudWatch","metric","logging","and","filter","creation","Args",":","enabled","(","bool",")",":","False","if","disabling","metrics",",","true","if","enable_logging","clusters","(","list",")",":","Clusters","to","enable","or","disable","metrics","on","lambda_functions","(","list",")",":","Which","lambda","functions","to","enable","or","disable","metrics","on","(","rule",",","alert",",","or","athena",")"]
code: def toggle_metrics(self, *lambda_functions, **kwargs):
      """Toggle CloudWatch metric logging and filter creation
  
      Args:
          enabled (bool): False if disabling metrics, true if enable_logging
          clusters (list): Clusters to enable or disable metrics on
          lambda_functions (list): Which lambda functions to enable or disable
              metrics on (rule, alert, or athena)
      """
      enabled = kwargs.get("enabled", False)
      clusters = kwargs.get("clusters", [])
      for function in lambda_functions:
          function_config = "{}_config".format(function)
          if function not in CLUSTERED_FUNCTIONS:
              if function_config not in self.config["lambda"]:
                  self.config["lambda"][function_config] = {}
              self.config["lambda"][function_config][
                  "enable_custom_metrics"
              ] = enabled
          else:
              # Classifier - toggle for each cluster
              for cluster in clusters:
                  self.config["clusters"][cluster][function_config][
                      "enable_custom_metrics"
                  ] = enabled
  
      self.write()
  
imports: import json
  import os
  import re
  import shutil
  import string
  import tempfile
  from streamalert.apps import StreamAlertApp
  from streamalert.shared import CLUSTERED_FUNCTIONS, config, metrics
  from streamalert.shared.logger import get_logger
  from streamalert_cli.terraform import TERRAFORM_FILES_PATH
  from streamalert_cli.apps.helpers import save_app_auth_info
  from streamalert_cli.helpers import continue_prompt
label_desc: Use image node_id 14 for calling the CLIConfig obj's underlying member method code with example usage: obj.toggle_metrics() without return types