<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def full_name(decl, with_defaults=True):
 """ Returns declaration full qualified name. If `decl` belongs to anonymous namespace or class, the function will return C++ illegal qualified name. Args: decl (declaration_t):
 declaration for which the full qualified name should be calculated. Returns: list[(str | basestring)]: full name of the declaration. """


    if None is decl:
        raise RuntimeError("Unable to generate full name for None object!")
    if with_defaults:
        if not decl.cache.full_name:
            path = declaration_path(decl)
            if path == [""]:
                # Declarations without names are allowed (for examples class
                # or struct instances). In this case set an empty name..
                decl.cache.full_name = ""
            else:
                decl.cache.full_name = full_name_from_declaration_path(path)
        return decl.cache.full_name
    else:
        if not decl.cache.full_partial_name:
            path = partial_declaration_path(decl)
            if path == [""]:
                # Declarations without names are allowed (for examples class
                # or struct instances). In this case set an empty name.
                decl.cache.full_partial_name = ""
            else:
                decl.cache.full_partial_name = \
                    full_name_from_declaration_path(path)
        return decl.cache.full_partial_name