code: def check_elem_in_list(elem, list, inverse=False, message=""):
      if inverse and elem in list:
          raise ivy.utils.exceptions.IvyException(
              message
              if message != ""
              else f"{elem} must not be one of {list}"
          )
      elif not inverse and elem not in list:
          raise ivy.utils.exceptions.IvyException(
              message
              if message != ""
              else f"{elem} must be one of {list}"
          )
  
imports: import ivy
label_desc: Use image node_id 7 for calling a global function with example usage: check_elem_in_list(elem, list, inverse, message) without return types