code: def update_stage_config(    self,
                                  project_name,
                                  stage_name,
                                  cloudwatch_log_level,
                                  cloudwatch_data_trace,
                                  cloudwatch_metrics_enabled
                              ):
          
          if cloudwatch_log_level not in self.cloudwatch_log_levels:
              cloudwatch_log_level = 'OFF'
  
          for api in self.get_rest_apis(project_name):
              self.apigateway_client.update_stage(
                  restApiId=api['id'],
                  stageName=stage_name,
                  patchOperations=[
                      self.get_patch_op('logging/loglevel', cloudwatch_log_level),
                      self.get_patch_op('logging/dataTrace', cloudwatch_data_trace),
                      self.get_patch_op('metrics/enabled', cloudwatch_metrics_enabled),
                  ]
              )
docs: Update CloudWatch metrics configuration.