Ensure data structures are accurately represented with their proper constraints and valid implementations, particularly for recursive structures. When documenting or implementing collections:

  1. Explicitly state data structure constraints
  2. Validate that recursive type examples actually terminate
# Incorrect recursive type definition (infinite recursion)
type B = list[C]
type C = B  # No termination condition!

# Correct recursive type definition with termination
type A = list[A] | None  # Terminates with None

Properly defined data structures not only prevent runtime errors but also enable more efficient algorithm implementations.