def find_container_traits(cls_or_string):
if utils.is_str(cls_or_string):<EOL><INDENT>if not templates.is_instantiation(cls_or_string):<EOL><INDENT>return None<EOL><DEDENT>name = templates.name(cls_or_string)<EOL>if name.startswith('<STR_LIT>'):<EOL><INDENT>name = name[len('<STR_LIT>'):]<EOL><DEDENT>if name.startswith('<STR_LIT>'):<EOL><INDENT>name = name[len('<STR_LIT>'):]<EOL><DEDENT>for cls_traits in all_container_traits:<EOL><INDENT>if cls_traits.name() == name:<EOL><INDENT>return cls_traits<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if isinstance(cls_or_string, class_declaration.class_types):<EOL><INDENT>if cls_or_string.cache.container_traits is not None:<EOL><INDENT>return cls_or_string.cache.container_traits<EOL><DEDENT><DEDENT>for cls_traits in all_container_traits:<EOL><INDENT>if cls_traits.is_my_case(cls_or_string):<EOL><INDENT>if isinstance(cls_or_string, class_declaration.class_types):<EOL><INDENT>cls_or_string.cache.container_traits = cls_traits<EOL><DEDENT>return cls_traits<EOL><DEDENT><DEDENT><DEDENT>
Find the container traits type of a declaration.

Args:
    cls_or_string (str | declarations.declaration_t): a string

Returns:
    declarations.container_traits: a container traits