class_docstr: Represents dataset batch returned by the dataloader during iteration.
class_docstr_tok: ["Represents","dataset","batch","returned","by","the","dataloader","during","iteration","."]
docstr: Calculate and cache the properties for the batch according to the property input type.
  
  Parameters
  ----------
  properties_list: Optional[List[Dict]]
      List of properties to calculate. If None, default properties will be calculated.
  input_type: PropertiesInputType
      The input type of the properties.
  
  Returns
  -------
  Dict[str, Any]
      Dictionary of the properties name to list of property values per data element.
docstr_tok: ["Calculate","and","cache","the","properties","for","the","batch","according","to","the","property","input","type",".","Parameters","--","--","--","--","--","properties_list",":","Optional","[","List","[","Dict","]","]","List","of","properties","to","calculate",".","If","None",",","default","properties","will","be","calculated",".","input_type",":","PropertiesInputType","The","input","type","of","the","properties",".","Returns","--","--","--","-","Dict","[","str",",","Any","]","Dictionary","of","the","properties","name","to","list","of","property","values","per","data","element","."]
code: def vision_properties(
      self,
      properties_list: Optional[List[Dict]],
      input_type: PropertiesInputType,
  ):
      """Calculate and cache the properties for the batch according to the property input type.
  
      Parameters
      ----------
      properties_list: Optional[List[Dict]]
          List of properties to calculate. If None, default properties will be calculated.
      input_type: PropertiesInputType
          The input type of the properties.
  
      Returns
      -------
      Dict[str, Any]
          Dictionary of the properties name to list of property values per data element.
      """
      if self._vision_properties_cache[input_type] is None:
          self._vision_properties_cache[input_type] = {}
      keys_in_cache = self._vision_properties_cache[input_type].keys()
  
      if properties_list is not None:
          properties_list = validate_properties(properties_list)
          requested_properties_names = [
              prop["name"] for prop in properties_list
          ]
          properties_to_calc = [
              p
              for p in properties_list
              if p["name"] not in keys_in_cache
          ]
          if len(properties_to_calc) > 0:
              data = self._get_relevant_data_for_properties(input_type)
              self._vision_properties_cache[input_type].update(
                  calc_vision_properties(data, properties_to_calc)
              )
      else:
          if input_type not in [
              PropertiesInputType.PARTIAL_IMAGES,
              PropertiesInputType.IMAGES,
          ]:
              # TODO: add support for quick default properties calculation for other input types
              raise DeepchecksProcessError(
                  f"None was passed to properties calculation for input type {input_type}."
              )
          requested_properties_names = [
              prop["name"] for prop in default_image_properties
          ]
          if any(
              x not in keys_in_cache for x in requested_properties_names
          ):
              data = self._get_relevant_data_for_properties(input_type)
              self._vision_properties_cache[input_type].update(
                  calc_default_image_properties(data)
              )
  
      return {
          key: value
          for key, value in self._vision_properties_cache[
              input_type
          ].items()
          if key in requested_properties_names
      }
  
imports: from typing import Dict, List, Optional, Union
  import numpy
  from deepchecks.core.errors import DeepchecksProcessError
  from deepchecks.vision.utils.image_functions import crop_image
  from deepchecks.vision.utils.image_properties import calc_default_image_properties, default_image_properties
  from deepchecks.vision.utils.vision_properties import PropertiesInputType, calc_vision_properties, validate_properties
  from deepchecks.vision.vision_data.utils import BatchOutputFormat, TaskType, sequence_to_numpy
label_desc: Use image node_id 3 for calling the BatchWrapper obj's underlying member method code with example usage: obj.vision_properties(properties_list, input_type) and returns: unknown