code: def assign_records_to_individuals(
      users: List[Any],
      records: List[Any],
      overlap: int,
      shuffle: bool = True,
  ) -> Dict[str, List[Any]]:
      """
      Assign records to users with controlled overlap and optional shuffle.
  
      Args:
          users: A list of user objects, each with a 'username' attribute.
          records: A list of record objects to be assigned to users.
          overlap: The number of times each record is assigned to consecutive users (0 for no overlap).
          shuffle: If True, the records list will be shuffled before assignment. Defaults to True.
  
      Returns:
          A dictionary where keys are usernames and values are lists of assigned records.
  
      Raises:
          ValueError: If `overlap` is higher than the number of users or negative.
      """
      if overlap < 0 or overlap >= len(users):
          raise ValueError(
              "Overlap must be less than the number of users and must not be negative."
          )
  
      if len(records) < len(users):
          warnings.warn(
              "The number of users is higher than the number of records. Some users will not be assigned any records.",
              UserWarning,
          )
  
      if shuffle:
          random.shuffle(records)
  
      users = [check_user(user) for user in users]
      assignments = {user.username: [] for user in users}
  
      num_users = len(users)
      overlap = 1 if overlap == 0 else overlap
  
      with Progress() as progress:
          task = progress.add_task(
              "[green]Processing records...", total=len(records)
          )
  
          for idx, record in enumerate(records):
              for offset in range(overlap):
                  user_index = (idx + offset) % num_users
                  user = users[user_index].username
                  assignments[user].append(record)
  
              progress.update(task, advance=1)
  
      return assignments
  
file_path: argilla/src/argilla/client/feedback/utils/assignment.py
imports: import random
  import warnings
  from collections import defaultdict
  from typing import Any, Dict, List, Union
  from rich.progress import Progress
  from argilla.client.users import User
  from argilla.client.workspaces import Workspace
label_desc: Use image node_id 4 for calling a global function with example usage: assign_records_to_individuals(users, records, overlap, shuffle) and returns: assignments