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"]
code: def _normalize_id(cls, v):
      if v is None:
          return str(uuid.uuid4())
      if isinstance(v, int):
          message = (
              "Integer ids won't be supported in future versions. We recommend to start using strings instead. "
              "For datasets already containing integer values we recommend migrating them to avoid deprecation issues. "
              "See https://docs.argilla.io/en/latest/getting_started/installation/configurations"
              "/database_migrations.html#elasticsearch"
          )
          warnings.warn(message, DeprecationWarning, stacklevel=2)
          # See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
          if v > cls._JS_MAX_SAFE_INTEGER:
              message = (
                  "You've provided a big integer value. Use a string instead, otherwise you may experience some "
                  "problems using the UI. See "
                  "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"
                  "/MAX_SAFE_INTEGER"
              )
              warnings.warn(message, UserWarning, stacklevel=2)
      elif not isinstance(v, str):
          raise TypeError(
              f"Invalid type for id. Expected {int} or {str}; found:{type(v)}"
          )
      return v
  
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 3 for calling the _Validators obj's underlying member method code with example usage: obj._normalize_id(cls, v) and returns: v, str