code: def get_entity_count_df(
      dataset: Dataset,
      merge_sides: bool = True,
      merge_subsets: bool = True,
      add_labels: bool = True,
  ) -> pd.DataFrame:
      """Create a dataframe with entity counts.
  
      :param dataset:
          The dataset.
      :param merge_sides:
          Whether to merge sides, i.e., entity positions: head vs. tail.
      :param merge_subsets:
          Whether to merge subsets, i.e., train/validation/test.
      :param add_labels:
          Whether to add entity / relation labels.
  
      :return:
          A dataframe with one row per entity.
      """
      return _common(
          dataset=dataset,
          triple_func=triple_analysis.get_entity_counts,
          merge_sides=merge_sides,
          merge_subsets=merge_subsets,
          add_labels=add_labels,
      )
  
file_path: pykeen/src/pykeen/datasets/analysis.py
imports: import logging
  from typing import Callable, Collection, Optional, Tuple, Union
  import pandas
  import torch
  from .base import Dataset
  from ..constants import PYKEEN_DATASETS
  from ..triples import analysis
  from ..typing import MappedTriples
label_desc: Use image node_id 5 for calling a global function with example usage: get_entity_count_df(dataset, merge_sides, merge_subsets, add_labels) and returns: _common