def GetGridInfo(data_dict, only_return=''):
  """Returns how grids are arranged in display.

  Args:
    data_dict: overview_data.json read in to a dictionary.
    only_return: if only one info field is requested.
                 'num_blocks', 'num_major_cols','num_major_rows',
                 'num_minor_cols', 'num_minor_rows',
                 'num_sims_per_block'
                 Default is all of these in a dictionary.

  Returns:
    grid_info: [dict] with fields
                'num_blocks', 'num_major_cols','num_major_rows',
                'num_minor_cols', 'num_minor_rows', 'num_sims_per_block'
  """

  grid_info = {
      'num_blocks': len(data_dict['table_data']),
      'num_major_cols': data_dict['num_major_cols'],
      'num_minor_cols': data_dict['table_data'][0]['num_cols'],
      'num_minor_rows': data_dict['table_data'][0]['num_rows'],
  }
  grid_info['num_major_rows'] = (grid_info['num_blocks'] /
                                 grid_info['num_major_cols'])
  grid_info['num_sims_per_block'] = (grid_info['num_minor_rows'] *
                                     grid_info['num_minor_cols'])
  if only_return:
    return grid_info[only_return]
  else:
    return grid_info