code: def attributes(df, attributes):
      """Validates if attributes exists in the dataframe.
  
      :param df: a dataframe from Aequitas
      :type df: pandas.core.frame.DataFrame
      :param attributes: an attribute or a list of attributes
      :type attributes: str or list
      """
  
      attributes = to_list(attributes)
  
      for attribute in attributes:
          attribute_df = df[df["attribute_name"] == attribute]
  
          if len(attribute_df) == 0:
              raise ValueError(
                  f"Attribute name {attribute} does not exist in the dataframe."
              )
  
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 3 for calling a global function with example usage: attributes(df, attributes) without return types