code: def convert_to_tuple(values: ValuesView) -> list[tuple]:
      """Converts a ValuesView object to a list of tuples.
  
      This is useful to get list of possible values for each parameter in the config and a tuple for values that are
      are to be patched. Ideally this is useful when used with product.
  
      Example:
          >>> params = DictConfig({
                  "dataset.category": [
                      "bottle",
                      "cable",
                  ],
                  "dataset.image_size": 224,
                  "model_name": ["padim"],
              })
          >>> convert_to_tuple(params.values())
          [('bottle', 'cable'), (224,), ('padim',)]
          >>> list(itertools.product(*convert_to_tuple(params.values())))
          [('bottle', 224, 'padim'), ('cable', 224, 'padim')]
  
      Args:
          values: ValuesView: ValuesView object to be converted to a list of tuples.
  
      Returns:
          list[Tuple]: List of tuples.
      """
      return_list = []
      for value in values:
          if isinstance(value, Iterable) and not isinstance(value, str):
              return_list.append(tuple(value))
          else:
              return_list.append((value,))
      return return_list
  
file_path: anomalib/src/anomalib/utils/sweep/config.py
imports: from __future__ import annotations
  import itertools
  import operator
  from collections.abc import Iterable, ValuesView
  from functools import reduce
  from typing import Any, Generator
  from omegaconf import DictConfig
label_desc: Use image node_id 1 for calling a global function with example usage: convert_to_tuple(values) and returns: return_list