# Aspects

Module for handling document aspects.

This module provides the Aspect class, which represents a defined area or topic within a document
that requires focused attention. Aspects are used to identify and extract specific subjects or themes
from documents according to predefined criteria.

### *class* contextgem.public.aspects.Aspect(\*\*data)

Bases: `_Aspect`

Represents an aspect with associated metadata, sub-aspects, concepts, and logic for validation.

An aspect is a defined area or topic within a document that requires focused attention.
Each aspect corresponds to a specific subject or theme described in the task.

* **Variables:**
  * **name** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the aspect. Required, non-empty string.
  * **description** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str)) – A detailed description of the aspect. Required, non-empty string.
  * **concepts** ([*list*](https://docs.python.org/3/builtins/stdtypes.html#list) *[* *\_Concept* *]*) – A list of concepts associated with the aspect. These concepts must be
    unique in both name and description, and must have the “text” modality.
  * **model_role** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str) *|* *None*) – The role label of the model that extracts the aspect when
    a `DocumentModelGroup` is used: the aspect is routed to the model in the group
    with the same `role`. Defaults to None, which routes the aspect to the model
    without a role. Ignored by a standalone model, which extracts every
    aspect it is given.
  * **reference_depth** (*ReferenceDepth*) – The structural depth of references (paragraphs or sentences).
    Defaults to “paragraphs”. Affects the structure of `extracted_items`.
  * **decision_threshold** ([*float*](https://docs.python.org/3/builtins/functions.html#float) *|* *None*) – The lowest probability (above 0, up to 1) with which
    a decision model (`DocumentDecisionModel`) takes a paragraph as belonging to
    the aspect, and, with `reference_depth="sentences"`, a sentence of such
    a paragraph. Defaults to None, in which case the `decision_threshold` of
    the decision model applies. Not passed on to the sub-aspects. Ignored when
    the aspect is extracted by an LLM.
  * **add_justifications** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool)) – Whether the LLM will output justification for each extracted item.
    Inherited from base class. Defaults to False.
  * **justification_depth** (*JustificationDepth*) – The level of detail for justifications.
    Inherited from base class. Defaults to “brief”.
  * **justification_max_sents** ([*int*](https://docs.python.org/3/builtins/functions.html#int)) – Maximum number of sentences in a justification.
    Inherited from base class. Defaults to 2.
* **Parameters:**
  * **custom_data** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*dict*](https://docs.python.org/3/builtins/stdtypes.html#dict) *[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str) *,* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any) *]* *,* [*BeforeValidator*](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator) *(**func=~contextgem.internal.typings.validators._validate_is_json_dict* *,* *json_schema_input_type=PydanticUndefined* *)* *]*)
  * **add_justifications** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*bool*](https://docs.python.org/3/builtins/functions.html#bool) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *]*)
  * **justification_depth** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal) *[* *'brief'* *,*  *'balanced'* *,*  *'comprehensive'* *]*)
  * **justification_max_sents** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*int*](https://docs.python.org/3/builtins/functions.html#int) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *]*)
  * **name** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *,* [*StringConstraints*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.StringConstraints) *(**strip_whitespace=True* *,* *to_upper=None* *,* *to_lower=None* *,* *strict=None* *,* *min_length=1* *,* *max_length=None* *,* *pattern=None* *,* *ascii_only=None* *)* *]*)
  * **description** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *,* [*StringConstraints*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.StringConstraints) *(**strip_whitespace=True* *,* *to_upper=None* *,* *to_lower=None* *,* *strict=None* *,* *min_length=1* *,* *max_length=None* *,* *pattern=None* *,* *ascii_only=None* *)* *]*)
  * **aspects** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) *[* *\_Aspect* *]* *,* [*BeforeValidator*](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator) *(**func=~contextgem.internal.typings.validators._validate_sequence_is_list* *,* *json_schema_input_type=PydanticUndefined* *)* *]*)
  * **concepts** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) *[* *\_Concept* *]* *,* [*BeforeValidator*](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator) *(**func=~contextgem.internal.typings.validators._validate_sequence_is_list* *,* *json_schema_input_type=PydanticUndefined* *)* *]*)
  * **model_role** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*str*](https://docs.python.org/3/builtins/stdtypes.html#str) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *,* [*AfterValidator*](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.AfterValidator) *(**func=~contextgem.internal.typings.validators._validate_model_role* *)* *]*  *|* *None*)
  * **reference_depth** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal) *[* *'paragraphs'* *,*  *'sentences'* *]*)
  * **decision_threshold** ([*Annotated*](https://docs.python.org/3/library/typing.html#typing.Annotated) *[*[*float*](https://docs.python.org/3/builtins/functions.html#float) *,* [*Strict*](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict) *(**strict=True* *)* *]*  *|* *None*)

Example:
: ```python
  from contextgem import Aspect
  <br/>
  <br/>
  # Define an aspect focused on termination clauses
  termination_aspect = Aspect(
      name="Termination provisions",
      description="Contract termination conditions, notice requirements, and severance terms.",
      reference_depth="sentences",
      add_justifications=True,
      justification_depth="comprehensive",
  )
  ```

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

#### add_aspects(aspects)

Adds aspects to the existing aspects list of an instance and returns the
updated instance. This method ensures that the provided aspects are deeply
copied to avoid any unintended state modification of the original reusable
aspects.

* **Parameters:**
  **aspects** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[`contextgem.internal.base.aspects._Aspect`]) – A list of aspects to be added. Each aspect is deeply copied
  to ensure the original list remains unaltered.
* **Returns:**
  Updated instance containing the newly added aspects.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### add_concepts(concepts)

Adds a list of new concepts to the existing concepts attribute of the instance. This method ensures
that the provided list of concepts is deep-copied to prevent unintended side effects from modifying
the input list outside of this method.

* **Parameters:**
  **concepts** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[`contextgem.internal.base.concepts._Concept`]) – A list of concepts to be added. It will be deep-copied before being added
  to the instance’s concepts attribute.
* **Returns:**
  Returns the instance itself after the modification.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### clone()

Creates and returns a deep copy of the current instance.

* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)
* **Returns:**
  A deep copy of the current instance.

#### *property* extracted_items *: [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_ExtractedItem]*

Provides access to extracted items.

* **Returns:**
  A list containing the extracted items as \_ExtractedItem objects.
* **Return type:**
  [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_ExtractedItem]

#### *classmethod* from_dict(obj_dict)

Reconstructs an instance of the class from a dictionary representation.

This method deserializes a dictionary containing the object’s attributes and values
into a new instance of the class. It handles complex nested structures like aspects,
concepts, and extracted items, properly reconstructing each component.

A deserialized model or model group has no API credentials, as they are not
included in the serialized data, i.e. they are to be set again.

* **Parameters:**
  **obj_dict** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`typing.Any`](https://docs.python.org/3/library/typing.html#typing.Any)]) – Dictionary containing the serialized object data.
* **Returns:**
  A new instance of the class with restored attributes.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### *classmethod* from_disk(file_path)

Loads an instance of the class from a JSON file stored on disk.

This method reads the JSON content from the specified file path and
deserializes it into an instance of the class using the from_json
method.

* **Parameters:**
  **file_path** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – Path to the JSON file to load (must end with ‘.json’).
  Can be a string or a Path object.
* **Returns:**
  An instance of the class populated with the data from the file.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)
* **Raises:**
  * [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If the file path doesn’t end with ‘.json’, or if the file
    does not hold valid serialized data, e.g. it is not a valid UTF-8 text
    (`UnicodeDecodeError`) or JSON (`json.JSONDecodeError`), or the data
    fails validation (pydantic’s `ValidationError`). These errors are
    subclasses of `ValueError`.
  * [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError) – If the serialized data is of another class.
  * [**OSError**](https://docs.python.org/3/builtins/exceptions.html#OSError) – If the file cannot be read, e.g. it does not exist.
    The error is the one raised by the file operation, e.g.
    `FileNotFoundError` or `PermissionError`.

#### *classmethod* from_json(json_string)

Creates an instance of the class from a JSON string representation.

This method deserializes the provided JSON string into a dictionary and uses
the from_dict method to construct the class instance. It validates that the
class name in the serialized data matches the current class.

* **Parameters:**
  **json_string** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – JSON string containing the serialized object data.
* **Returns:**
  A new instance of the class with restored state.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)
* **Raises:**
  * [**json.JSONDecodeError**](https://docs.python.org/3/library/json.html#json.JSONDecodeError) – If the string is not a valid JSON. The error
    gives the position of what is invalid, and does not hold the string.
  * [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If the JSON value is not an object with a class name,
    i.e. not serialized data.
  * [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError) – If the class name in the serialized data doesn’t match.

#### get_aspect_by_name(name)

Finds and returns an aspect with the specified name from the list of available aspects,
if the instance has aspects attribute.

* **Parameters:**
  **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the aspect to find.
* **Returns:**
  The aspect with the specified name.
* **Return type:**
  `contextgem.internal.base.aspects._Aspect`
* **Raises:**
  [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If no aspect with the specified name is found.

#### get_aspects_by_names(names)

Retrieve a list of \_Aspect objects corresponding to the provided list of names.

* **Parameters:**
  **names** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]) – List of aspect names to retrieve. The names must be provided
  as a list of strings.
* **Returns:**
  A list of \_Aspect objects corresponding to provided names.
* **Return type:**
  [`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[`contextgem.internal.base.aspects._Aspect`]

#### get_concept_by_name(name)

Retrieves a concept from the list of concepts based on the provided name,
if the instance has concepts attribute.

* **Parameters:**
  **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the concept to search for.
* **Returns:**
  The \_Concept object with the specified name.
* **Return type:**
  `contextgem.internal.base.concepts._Concept`
* **Raises:**
  [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If no concept with the specified name is found.

#### get_concepts_by_names(names)

Retrieve a list of \_Concept objects corresponding to the provided list of names.

* **Parameters:**
  **names** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]) – List of concept names to retrieve. The names must be provided
  as a list of strings.
* **Returns:**
  A list of \_Concept objects corresponding to provided names.
* **Return type:**
  [`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[`contextgem.internal.base.concepts._Concept`]

#### *property* reference_paragraphs *: [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_Paragraph]*

Provides access to the instance’s reference paragraphs, assigned during extraction.

* **Returns:**
  A list containing the paragraphs as \_Paragraph objects.
* **Return type:**
  [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_Paragraph]

#### *property* reference_sentences *: [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_Sentence]*

Provides access to the instance’s reference sentences, assigned during extraction.

* **Returns:**
  A list containing the sentences as \_Sentence objects.
* **Return type:**
  [list](https://docs.python.org/3/builtins/stdtypes.html#list)[\_Sentence]

#### remove_all_aspects()

Removes all aspects from the instance and returns the updated instance.

This method clears the aspects attribute of the instance by resetting it to
an empty list. It returns the same instance, allowing for method chaining.

* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)
* **Returns:**
  The updated instance with all aspects removed

#### remove_all_concepts()

Removes all concepts from the instance and returns the updated instance.

This method clears the concepts attribute of the instance by resetting it to
an empty list. It returns the same instance, allowing for method chaining.

* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)
* **Returns:**
  The updated instance with all concepts removed

#### remove_all_instances()

Removes all assigned instances from the object and resets
them as empty lists. Returns the modified instance.

* **Returns:**
  The modified object with all assigned instances removed.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### remove_aspect_by_name(name)

Removes an aspect from the assigned aspects by its name.

* **Parameters:**
  **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the aspect to be removed
* **Returns:**
  Updated instance with the aspect removed.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### remove_aspects_by_names(names)

Removes multiple aspects from an object based on the provided list of names.

* **Parameters:**
  **names** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]) – A list of names identifying the aspects to be removed.
* **Returns:**
  The updated object after the specified aspects have been removed.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### remove_concept_by_name(name)

Removes a concept from the assigned concepts by its name.

* **Parameters:**
  **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the concept to be removed
* **Returns:**
  Updated instance with the concept removed.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### remove_concepts_by_names(names)

Removes concepts from the object by their names.

* **Parameters:**
  **names** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)]) – A list of concept names to be removed.
* **Returns:**
  Returns the updated instance after removing the specified concepts.
* **Return type:**
  [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self)

#### to_dict()

Transforms the current object into a dictionary representation.

Converts the object to a dictionary that includes:
- All public attributes
- Special handling for specific public and private attributes

When a model or model group is serialized, its API credentials and usage/cost stats are removed.

* **Returns:**
  A dictionary representation of the current object with all necessary data for serialization
* **Return type:**
  [`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)[[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`typing.Any`](https://docs.python.org/3/library/typing.html#typing.Any)]

#### to_disk(file_path)

Saves the serialized instance to a JSON file at the specified path.

This method converts the instance to a dictionary representation using to_dict(),
then writes it to disk as a formatted JSON file with UTF-8 encoding.

* **Parameters:**
  **file_path** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) | [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path)) – Path where the JSON file should be saved (must end with ‘.json’).
  Can be a string or a Path object.
* **Return type:**
  [`None`](https://docs.python.org/3/builtins/constants.html#None)
* **Returns:**
  None
* **Raises:**
  * [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If the file path doesn’t end with ‘.json’.
  * [**OSError**](https://docs.python.org/3/builtins/exceptions.html#OSError) – If the file cannot be written, e.g. its directory does not
    exist. The error is the one raised by the file operation, e.g.
    `FileNotFoundError` or `PermissionError`.

#### to_json()

Converts the object to its JSON string representation.

Serializes the object into a JSON-formatted string using the dictionary
representation provided by the to_dict() method.

* **Returns:**
  A JSON string representation of the object.
* **Return type:**
  [`str`](https://docs.python.org/3/builtins/stdtypes.html#str)

#### *property* unique_id *: [str](https://docs.python.org/3/builtins/stdtypes.html#str)*

Returns the ULID of the instance.

#### name *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Strict](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict)(strict=True), [StringConstraints](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.StringConstraints)(strip_whitespace=True, to_upper=[None](https://docs.python.org/3/builtins/constants.html#None), to_lower=[None](https://docs.python.org/3/builtins/constants.html#None), strict=[None](https://docs.python.org/3/builtins/constants.html#None), min_length=1, max_length=[None](https://docs.python.org/3/builtins/constants.html#None), pattern=[None](https://docs.python.org/3/builtins/constants.html#None), ascii_only=[None](https://docs.python.org/3/builtins/constants.html#None))]*

#### description *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Strict](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict)(strict=True), [StringConstraints](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.StringConstraints)(strip_whitespace=True, to_upper=[None](https://docs.python.org/3/builtins/constants.html#None), to_lower=[None](https://docs.python.org/3/builtins/constants.html#None), strict=[None](https://docs.python.org/3/builtins/constants.html#None), min_length=1, max_length=[None](https://docs.python.org/3/builtins/constants.html#None), pattern=[None](https://docs.python.org/3/builtins/constants.html#None), ascii_only=[None](https://docs.python.org/3/builtins/constants.html#None))]*

#### aspects *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[\_Aspect], [BeforeValidator](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator)(func=\_validate_sequence_is_list, json_schema_input_type=PydanticUndefined)]*

#### concepts *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[\_Concept], [BeforeValidator](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator)(func=\_validate_sequence_is_list, json_schema_input_type=PydanticUndefined)]*

#### reference_depth *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['paragraphs', 'sentences']*

#### decision_threshold *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[float](https://docs.python.org/3/builtins/functions.html#float), [Strict](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict)(strict=True)] | [None](https://docs.python.org/3/builtins/constants.html#None)*

#### add_justifications *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[bool](https://docs.python.org/3/builtins/functions.html#bool), [Strict](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict)(strict=True)]*

#### justification_depth *: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['brief', 'balanced', 'comprehensive']*

#### justification_max_sents *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[int](https://docs.python.org/3/builtins/functions.html#int), [Strict](https://pydantic.dev/docs/validation/latest/api/pydantic/types/#pydantic.types.Strict)(strict=True)]*

#### custom_data *: [Annotated](https://docs.python.org/3/library/typing.html#typing.Annotated)[[dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)], [BeforeValidator](https://pydantic.dev/docs/validation/latest/api/pydantic/functional_validators/#pydantic.functional_validators.BeforeValidator)(func=\_validate_is_json_dict, json_schema_input_type=PydanticUndefined)]*
