original_docstring: validate_bar_values_count uses Pydantic tooling to enforce valid Entity states
  
          Domain entities are responsible for "maintaining their invariants", essentially
          meaning to enforcing only valid states.
          Pydantic validators, along with the Config.validate_assignment property are helpful
          for this purpose. Enums are another tool to enforce valid states.
          Non-pydantic classes would use getters and setters to control access to private attributes,
          and keep validation logic in the setters.
          
docstring: validate_bar_values_count uses Pydantic tooling to enforce valid Entity states
  Domain entities are responsible for "maintaining their invariants", essentially
  meaning to enforcing only valid states.
  Pydantic validators, along with the Config.validate_assignment property are helpful
  for this purpose. Enums are another tool to enforce valid states.
  Non-pydantic classes would use getters and setters to control access to private attributes,
  and keep validation logic in the setters.
docstring_tokens: validate_bar_values_count uses Pydantic tooling to enforce valid Entity states Domain entities are responsible for " maintaining their invariants " essentially meaning to enforcing only valid states . Pydantic validators along with the Config . validate_assignment property are helpful for this purpose . Enums are another tool to enforce valid states . Non - pydantic classes would use getters and setters to control access to private attributes and keep validation logic in the setters .
code: def validate_bar_values_count(cls, bar_values: Set[BarValueObject]):
          """validate_bar_values_count uses Pydantic tooling to enforce valid Entity states
  
          Domain entities are responsible for "maintaining their invariants", essentially
          meaning to enforcing only valid states.
          Pydantic validators, along with the Config.validate_assignment property are helpful
          for this purpose. Enums are another tool to enforce valid states.
          Non-pydantic classes would use getters and setters to control access to private attributes,
          and keep validation logic in the setters.
          """
          if len(bar_values) > cls.MAX_BAR_VALUE_COUNT:
              raise ValueError(f"Entity cannot have more than {cls.MAX_BAR_VALUE_COUNT} bar values")
  
          return bar_values
code_tokens: def validate_bar_values_count ( cls , bar_values : Set [ BarValueObject ] ) : if len ( bar_values ) > cls . MAX_BAR_VALUE_COUNT : raise ValueError ( f"Entity cannot have more than {cls.MAX_BAR_VALUE_COUNT} bar values" ) return bar_values
short_docstring: validate_bar_values_count uses Pydantic tooling to enforce valid Entity states
  Domain entities are responsible for "maintaining their invariants", essentially
  meaning to enforcing only valid states.
short_docstring_tokens: validate_bar_values_count uses Pydantic tooling to enforce valid Entity states Domain entities are responsible for " maintaining their invariants " essentially meaning to enforcing only valid states .
comment: """validate_bar_values_count uses Pydantic tooling to enforce valid Entity states
  
          Domain entities are responsible for "maintaining their invariants", essentially
          meaning to enforcing only valid states.
          Pydantic validators, along with the Config.validate_assignment property are helpful
          for this purpose. Enums are another tool to enforce valid states.
          Non-pydantic classes would use getters and setters to control access to private attributes,
          and keep validation logic in the setters.
          """