code: def get_historical_base_info(event):
      
      data = {
          'principalId': get_principal(event),
          'userIdentity': get_user_identity(event),
          'accountId': event['account'],
          'userAgent': event['detail'].get('userAgent'),
          'sourceIpAddress': event['detail'].get('sourceIPAddress'),
          'requestParameters': event['detail'].get('requestParameters')
      }
  
      if event['detail'].get('eventTime'):
          data['eventTime'] = event['detail']['eventTime']
  
      if event['detail'].get('eventSource'):
          data['eventSource'] = event['detail']['eventSource']
  
      if event['detail'].get('eventName'):
          data['eventName'] = event['detail']['eventName']
  
      return data
docs: Gets the base details from the CloudWatch Event.