code: def __calculate_default_sizes(
      chart_height,
      chart_width,
      chart_default_sizes,
      metrics=None,
      attributes=None,
  ):
      if chart_height is None:
          num_metrics = len(metrics)
  
          chart_height = calculate_chart_size_from_elements(
              chart_default_sizes.vertical_header_height,
              chart_default_sizes.line_height,
              num_metrics,
          )
  
      if chart_width is None:
          num_attributes = len(attributes)
  
          chart_width = calculate_chart_size_from_elements(
              chart_default_sizes.horizontal_header_width,
              chart_default_sizes.column_width,
              num_attributes,
          )
  
      return (chart_height, chart_width)
  
file_path: aequitas/src/aequitas/plot/commons/initializers.py
imports: import altair
  from aequitas.plot.commons import validators
  from aequitas.plot.commons import scales
  from aequitas.plot.commons.helpers import to_list, calculate_chart_size_from_elements
label_desc: Use image node_id 4 for calling a global function with example usage: __calculate_default_sizes(chart_height, chart_width, chart_default_sizes, metrics, attributes) and returns: chart_height,  chart_width