code: def fetch_credential_report(self, credentials, ignore_exception = False):
          
          iam_report = {}
          try:
              api_client = connect_service('iam', credentials, silent = True)
              response = api_client.generate_credential_report()
              if response['State'] != 'COMPLETE':
                  if not ignore_exception:
                      printError('Failed to generate a credential report.')
                  return
              report = api_client.get_credential_report()['Content']
              lines = report.splitlines()
              keys = lines[0].decode('utf-8').split(',')
              for line in lines[1:]:
                  values = line.decode('utf-8').split(',')
                  manage_dictionary(iam_report, values[0], {})
                  for key, value in zip(keys, values):
                      iam_report[values[0]][key] = value
              self.credential_report = iam_report
              self.fetchstatuslogger.counts['credential_report']['fetched'] = 1
          except Exception as e:
              if ignore_exception:
                  return
              printError('Failed to download a credential report.')
              printException(e)
docs: Fetch the credential report
  
          :param: api_client
          :type: FOO
          :param: ignore_exception : initiate credential report creation as not  always ready
          :type: Boolean