def _ValidateComponentClassifierConfig(component_classifier_config):
  """Checks that a component_classifier_config dict is properly formatted.

  Args:
    commponent_classifier_config (dict): A dictionary that provides component to
      its function and path patterns, and some other settings.
      For example:
      {
          'path_function_component': [
              [
                  'src/chrome/common/extensions/api/gcm.json',
                  '',
                  'Services>CloudMessaging'
              ],
              ...
              [
                  'src/chrome/browser/accessibility',
                  '',
                  'UI>Accessibility'
              ],
           ],
          'top_n': 4
      }

  Returns:
    True if ``component_classifier_config`` is properly formatted, False
    otherwise.
  """
  if not isinstance(component_classifier_config, dict):
    return False

  path_function_component = component_classifier_config.get(
      'path_function_component')
  if not isinstance(path_function_component, list):
    return False

  top_n = component_classifier_config.get('top_n')
  if not isinstance(top_n, int):
    return False

  return True