code: def check_parameter_accepted_values(
      param, param_name, accepted_values
  ):
      """Raise an error if parameter does not belong to a set of values.
  
      Parameters
      ----------
      param : unspecified
          Parameter to be tested.
      param_name : string
          Name of the parameter.
      accepted_values : list
          Accepted values that the parameter can take.
      """
      if param not in accepted_values:
          raise ValueError(
              f"Parameter {param_name} needs to be in {accepted_values}, got: {param}."
          )
  
file_path: geomstats/geomstats/errors.py
imports: import math
  import geomstats.backend
label_desc: Use image node_id 4 for calling a global function with example usage: check_parameter_accepted_values(param, param_name, accepted_values) without return types