class_docstr: Base class for our record models that takes care of general validations
class_docstr_tok: ["Base","class","for","our","record","models","that","takes","care","of","general","validations"]
docstr: Checks metadata values length and warn message for large values
docstr_tok: ["Checks","metadata","values","length","and","warn","message","for","large","values"]
code: def _check_value_length(cls, metadata):
      """Checks metadata values length and warn message for large values"""
      if not metadata:
          return metadata
  
      default_length_exceeded = False
      for k, v in metadata.items():
          if k.startswith(cls._PROTECTED_METADATA_FIELD_PREFIX):
              continue
          if isinstance(v, str) and len(v) > DEFAULT_MAX_KEYWORD_LENGTH:
              default_length_exceeded = True
              break
  
      if default_length_exceeded:
          message = (
              "Some metadata values could exceed the max length. For those cases,"
              " values will be truncated by keeping only the last"
              f" {DEFAULT_MAX_KEYWORD_LENGTH} characters. "
              + _messages.ARGILLA_METADATA_FIELD_WARNING_MESSAGE
          )
          warnings.warn(message, UserWarning, stacklevel=2)
  
      return metadata
  
imports: import datetime
  import logging
  import uuid
  import warnings
  from enum import Enum
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pandas
  from deprecated import deprecated
  from argilla import _messages
  from argilla._constants import DEFAULT_MAX_KEYWORD_LENGTH
  from argilla.pydantic_v1 import BaseModel, Field, PrivateAttr, root_validator, validator
  from argilla.utils.span_utils import SpanUtils
label_desc: Use image node_id 1 for calling the _Validators obj's underlying member method code with example usage: obj._check_value_length(cls, metadata) and returns: metadata, metadata