docs: def run_numerical_categorical_analysis(args, schema_list):
    """Makes the numerical and categorical analysis files.
  
    Args:
      args: the command line args
      schema_list: python object of the schema json file.
  
    Raises:
      ValueError: if schema contains unknown column types.
    """
    header = [column['name'] for column in schema_list]
    input_files = file_io.get_matching_files(args.input_file_pattern)
  
    # Check the schema is valid
    for col_schema in schema_list:
      col_type = col_schema['type'].lower()
      if col_type != 'string' and col_type != 'integer' and col_type != 'float':
        raise ValueError('Schema contains an unsupported type %s.' % col_type)
  
    # initialize the results
    def _init_numerical_results():
      return {'min': float('inf'),
              'max': float('-inf'),
              'count': 0,
              'sum': 0.0}
    numerical_results = collections.defaultdict(_init_numerical_results)
    categorical_results = collections.defaultdict(set)
  
    # for each file, update the numerical stats from that file, and update the set
    # of unique labels.
    for input_file in input_files:
      with file_io.FileIO(input_file, 'r') as f:
        for line in f:
          parsed_line = dict(zip(header, line.strip().split(',')))
  
          for col_schema in schema_list:
            col_name = col_schema['name']
            col_type = col_schema['type']
            if col_type.lower() == 'string':
              categorical_results[col_name].update([parsed_line[col_name]])
            else:
              # numerical column.
  
              # if empty, skip
              if not parsed_line[col_name].strip():
                continue
  
              numerical_results[col_name]['min'] = (
                min(numerical_results[col_name]['min'],
                    float(parsed_line[col_name])))
              numerical_results[col_name]['max'] = (
                max(numerical_results[col_name]['max'],
                    float(parsed_line[col_name])))
              numerical_results[col_name]['count'] += 1
              numerical_results[col_name]['sum'] += float(parsed_line[col_name])
  
    # Update numerical_results to just have min/min/mean
    for col_schema in schema_list:
      if col_schema['type'].lower() != 'string':
        col_name = col_schema['name']
        mean = numerical_results[col_name]['sum'] / numerical_results[col_name]['count']
        del numerical_results[col_name]['sum']
        del numerical_results[col_name]['count']
        numerical_results[col_name]['mean'] = mean
  
    # Write the numerical_results to a json file.
    file_io.write_string_to_file(
        os.path.join(args.output_dir, NUMERICAL_ANALYSIS_FILE),
        json.dumps(numerical_results, indent=2, separators=(',', ': ')))
  
    # Write the vocab files. Each label is on its own line.
    for name, unique_labels in six.iteritems(categorical_results):
      labels = '\n'.join(list(unique_labels))
      file_io.write_string_to_file(
          os.path.join(args.output_dir, CATEGORICAL_ANALYSIS_FILE % name),
          labels)