code: def validate_properties(properties: List[Dict[str, Any]]):
      """Validate structure of measurements."""
      if not isinstance(properties, list):
          raise DeepchecksValueError(
              "Expected properties to be a list, "
              f"instead got {type(properties).__name__}"
          )
  
      if len(properties) == 0:
          raise DeepchecksValueError("Properties list can't be empty")
  
      expected_keys = ("name", "method", "output_type")
      output_types = ("categorical", "numerical", "class_id")
  
      errors = []
  
      for index, image_property in enumerate(properties):
          if not isinstance(image_property, dict) or not all(
              key in image_property for key in expected_keys
          ):
              errors.append(
                  f"Item #{index}: property must be of type dict, "
                  f"and include keys {expected_keys}."
              )
              continue
  
          image_property["name"] = property_name = (
              image_property.get("name") or f"#{index}"
          )
          difference = sorted(
              set(expected_keys).difference(set(image_property.keys()))
          )
  
          if len(difference) > 0:
              errors.append(
                  f"Property {property_name}: dictionary must include keys {expected_keys}. "
                  f"Next keys are missed {difference}"
              )
              continue
  
          property_output_type = image_property["output_type"]
  
          if property_output_type not in output_types:
              errors.append(
                  f'Property {property_name}: field "output_type" must be one of {output_types}, '
                  f"instead got {property_output_type}"
              )
  
      if len(errors) > 0:
          errors = "\n+ ".join(errors)
          raise DeepchecksValueError(
              f"List of properties contains next problems:\n+ {errors}"
          )
  
      return properties
  
file_path: deepchecks/deepchecks/vision/utils/vision_properties.py
imports: from enum import Enum
  from collections import defaultdict
  from typing import Any, Dict, List
  from deepchecks.core.errors import DeepchecksValueError
label_desc: Use image node_id 2 for calling a global function with example usage: validate_properties(properties) and returns: properties