docs: def report(config, tags, accounts, master, debug, region):
      """report on guard duty enablement by account"""
      accounts_config, master_info, executor = guardian_init(
          config, debug, master, accounts, tags)
  
      session = get_session(
          master_info.get('role'), 'c7n-guardian',
          master_info.get('profile'),
          region)
  
      client = session.client('guardduty')
      detector_id = get_or_create_detector_id(client)
  
      members = {m['AccountId']: m for m in
                 client.list_members(DetectorId=detector_id).get('Members')}
  
      accounts_report = []
      for a in accounts_config['accounts']:
          ar = dict(a)
          accounts_report.append(ar)
          ar.pop('tags', None)
          ar.pop('role')
          ar.pop('regions', None)
          if a['account_id'] not in members:
              ar['member'] = False
              ar['status'] = None
              ar['invited'] = None
              ar['updated'] = datetime.datetime.now().isoformat()
              continue
          m = members[a['account_id']]
          ar['status'] = m['RelationshipStatus']
          ar['member'] = True
          ar['joined'] = m['InvitedAt']
          ar['updated'] = m['UpdatedAt']
  
      accounts_report.sort(key=operator.itemgetter('updated'), reverse=True)
      print(tabulate(accounts_report, headers=('keys')))