<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def declarations(cls, extra_defs=None):
 """Retrieve a copy of the declared attributes. Args: extra_defs (dict):
 additional definitions to insert into the retrieved DeclarationDict. """

        warnings.warn(
            "Factory.declarations is deprecated; use Factory._meta.pre_declarations instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        decls = cls._meta.pre_declarations.as_dict()
        decls.update(extra_defs or {})
        return decls