class_docstr: Normalizer class to handle log key normalization in payloads
docstr: Load and parse normalization config from conf/schemas/*.json. Normalization will be
  configured along with log schema and a path will be provided to find the original key.
  
  For example: conf/schemas/cloudwatch.json looks like
      'cloudwatch:events': {
          'schema': {
              'account': 'string',
              'source': 'string',
              'other_key': 'string'
          },
          'configuration': {
              'normalization': {
                  'region': ['path', 'to', 'original', 'key'],
                  'ip_address': [
                      {
                          'path': ['detail', 'sourceIPAddress'],
                          'function': 'source ip address'
                      },
                      {
                          'path': ['path', 'to', 'original', 'key'],
                          'function': 'destination ip address'
                      }
                  ]
              }
          }
      }
  
  Args:
      config (dict): Config read from 'conf/' directory
  
  Returns:
      dict: return a dict contains normalization information per log type basis.
          {
              'cloudwatch:events': {
                  'region': NormalizedType(),
                  'ip_address': NormalizedType()
              }
          }
docstr_tok: ["Load","and","parse","normalization","config","from","conf\/schemas\/","*",".json",".","Normalization","will","be","configured","along","with","log","schema","and","a","path","will","be","provided","to","find","the","original","key",".","For","example",":","conf\/schemas\/cloudwatch.json","looks","like","'cloudwatch",":","events","'",":","{","'schema","'",":","{","'account","'",":","'string","'",",","'source","'",":","'string","'",",","'other_key","'",":","'string'","}",",","'configuration","'",":","{","'normalization","'",":","{","'region","'",":","[","'path","'",",","'to","'",",","'original","'",",","'key","'","]",",","'ip_address","'",":","[","{","'path","'",":","[","'detail","'",",","'sourceIPAddress","'","]",",","'function","'",":","'source","ip","address'","}",",","{","'path","'",":","[","'path","'",",","'to","'",",","'original","'",",","'key","'","]",",","'function","'",":","'destination","ip","address'","}","]","}","}","}","Args",":","config","(","dict",")",":","Config","read","from","'conf\/","'","directory","Returns",":","dict",":","return","a","dict","contains","normalization","information","per","log","type","basis",".","{","'cloudwatch",":","events","'",":","{","'region","'",":","NormalizedType","(",")",",","'ip_address","'",":","NormalizedType","(",")","}","}"]
code: def _parse_normalization(cls, config):
      """Load and parse normalization config from conf/schemas/*.json. Normalization will be
      configured along with log schema and a path will be provided to find the original key.
  
      For example: conf/schemas/cloudwatch.json looks like
          'cloudwatch:events': {
              'schema': {
                  'account': 'string',
                  'source': 'string',
                  'other_key': 'string'
              },
              'configuration': {
                  'normalization': {
                      'region': ['path', 'to', 'original', 'key'],
                      'ip_address': [
                          {
                              'path': ['detail', 'sourceIPAddress'],
                              'function': 'source ip address'
                          },
                          {
                              'path': ['path', 'to', 'original', 'key'],
                              'function': 'destination ip address'
                          }
                      ]
                  }
              }
          }
  
      Args:
          config (dict): Config read from 'conf/' directory
  
      Returns:
          dict: return a dict contains normalization information per log type basis.
              {
                  'cloudwatch:events': {
                      'region': NormalizedType(),
                      'ip_address': NormalizedType()
                  }
              }
      """
      normalized_config = defaultdict(dict)
      for log_type, val in config.get(
          TopLevelConfigKeys.LOGS, {}
      ).items():
          result = defaultdict(dict)
  
          log_type_normalization = val.get("configuration", {}).get(
              "normalization", {}
          )
  
          for normalized_type, params in log_type_normalization.items():
              # add normalization info if it is defined in log type configuration field
              result[normalized_type] = NormalizedType(
                  log_type, normalized_type, params
              )
  
          if result:
              normalized_config[log_type] = result
  
      # return None is normalized_config is an empty defaultdict.
      return normalized_config or None
  
imports: from collections import defaultdict
  import logging
  import itertools
  import uuid
  from streamalert.shared.config import TopLevelConfigKeys
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 8 for calling the Normalizer obj's underlying member method code with example usage: obj._parse_normalization(cls, config) and returns: unknown