docstr: Validates if the input data is a collection or a namespace with collections leafs.
  If steps or timestamps are passed, check if its length is equal to all given values.
docstr_tok: ["Validates","if","the","input","data","is","a","collection","or","a","namespace","with","collections","leafs",".","If","steps","or","timestamps","are","passed",",","check","if","its","length","is","equal","to","all","given","values","."]
code: def validate_values_for_extend(values, steps, timestamps):
      """Validates if the input data is a collection or a namespace with collections leafs.
      If steps or timestamps are passed, check if its length is equal to all given values.
      """
      collections_lengths = set(
          ExtendUtils.generate_leaf_collection_lengths(values)
      )
  
      if len(collections_lengths) > 1:
          if steps is not None:
              raise NeptuneUserApiInputException(
                  "Number of steps must be equal to the number of values"
              )
          if timestamps is not None:
              raise NeptuneUserApiInputException(
                  "Number of timestamps must be equal to the number of values"
              )
      else:
          common_collections_length = next(iter(collections_lengths))
          if steps is not None and common_collections_length != len(
              steps
          ):
              raise NeptuneUserApiInputException(
                  "Number of steps must be equal to the number of values"
              )
          if (
              timestamps is not None
              and common_collections_length != len(timestamps)
          ):
              raise NeptuneUserApiInputException(
                  "Number of timestamps must be equal to the number of values"
              )
  
imports: from functools import wraps
  from typing import TYPE_CHECKING, Any, Collection, Dict, Iterable, Iterator, List, NewType, Optional, Union
  from neptune.api.dtos import FileEntry
  from neptune.attributes import File
  from neptune.attributes.atoms.artifact import Artifact
  from neptune.attributes.constants import SYSTEM_STAGE_ATTRIBUTE_PATH
  from neptune.attributes.file_set import FileSet
  from neptune.attributes.namespace import Namespace
  from neptune.attributes.series import FileSeries
  from neptune.attributes.series.float_series import FloatSeries
  from neptune.attributes.series.string_series import StringSeries
  from neptune.attributes.sets.string_set import StringSet
  from neptune.common.warnings import warn_about_unsupported_type
  from neptune.exceptions import MissingFieldException, NeptuneCannotChangeStageManually, NeptuneUserApiInputException
  from neptune.internal.artifacts.types import ArtifactFileData
  from neptune.internal.types.stringify_value import StringifyValue
  from neptune.internal.utils import is_collection, is_dict_like, is_float, is_float_like, is_string, is_stringify_value, verify_collection_type, verify_type
  from neptune.internal.utils.paths import join_paths, parse_path
  from neptune.internal.value_to_attribute_visitor import ValueToAttributeVisitor
  from neptune.metadata_containers.abstract import SupportsNamespaces
  from neptune.types.atoms.file import File
  from neptune.types.type_casting import cast_value_for_extend
  from neptune.types.value_copy import ValueCopy
  from neptune.utils import stringify_unsupported
label_desc: Use image node_id 2 for calling the ExtendUtils obj's underlying member method code with example usage: obj.validate_values_for_extend(values, steps, timestamps) without return types