code: def check_limits(self, acct_id, region_name, role_name=None,
                       limit_overrides={}, threshold_overrides={}):
          
          # instantiate the class
          if role_name is not None:
              checker = AwsLimitChecker(
                  account_id=acct_id, region=region_name, account_role=role_name
              )
          else:
              checker = AwsLimitChecker(region=region_name)
          # set your overrides
          if len(threshold_overrides) > 0:
              checker.set_threshold_overrides(threshold_overrides)
          if len(limit_overrides) > 0:
              checker.set_limit_overrides(limit_overrides)
  
          # check usage against thresholds
          checker.check_thresholds()
  
          # save state for exit code and summary
          warnings = []
          criticals = []
  
          # iterate the results
          for service, svc_limits in sorted(checker.get_limits().items()):
              for limit_name, limit in sorted(svc_limits.items()):
                  # check warnings and criticals for each Limit
                  for warn in limit.get_warnings():
                      warnings.append(colored("{service} '{limit_name}' usage "
                                              "({u}) exceeds warning threshold "
                                              "(limit={l})".format(
                                                  service=service,
                                                  limit_name=limit_name,
                                                  u=str(warn),
                                                  l=limit.get_limit(),
                                              ), 'yellow'))
                  for crit in limit.get_criticals():
                      criticals.append(colored("{service} '{limit_name}' usage "
                                               "({u}) exceeds critical threshold"
                                               " (limit={l})".format(
                                                   service=service,
                                                   limit_name=limit_name,
                                                   u=str(crit),
                                                   l=limit.get_limit(),
                                               ), 'red'))
          return warnings, criticals
docs: Run the actual usage and limit check, with overrides, against a specific
          account in a specific region, optionally assuming a role in the account
          and optionally setting limit and/or threshold overrides.
  
          Return a 2-tuple of lists, warning strings and critical strings.
  
          see: http://awslimitchecker.readthedocs.org/en/latest/python_usage.html
  
          :returns: 2-tuple of lists of strings, warnings and criticals