code: def chart_size_xy(width, height):
      """Given parameters width and height for the XY chart, this function checks if height is equal to width and if there is enough area to render all elements.
  
      :param width: chart width
      :type width: int
      :param height: chart height
      :type height: int
      """
      if width != height:
          raise ValueError(
              f"The chart width and height must be the same."
          )
  
      if width < Sizes.XY_Chart.min_side:
          raise ValueError(
              f"The chart width must be at least {Sizes.XY_Chart.min_side} to preserve a sensible aspect ratio."
          )
  
file_path: aequitas/src/aequitas/plot/commons/validators.py
imports: from aequitas.plot.commons.style import sizes
  from aequitas.plot.commons.helpers import calculate_chart_size_from_elements, to_list
label_desc: Use image node_id 7 for calling a global function with example usage: chart_size_xy(width, height) without return types