def METHOD_NAME(self):
    self.newline()
    # List containing names of structs with COM object members.
    structs_with_objects = {
        **self.CUSTOM_STRUCT_HANDLE_MAP, 'D3D12_CPU_DESCRIPTOR_HANDLE':
        ['ptr']
    }
    # Find structs with COM object members, which will need to be
    # unwrapped.
    struct_dict = self.source_dict['struct_dict']
    for struct in struct_dict:
        self.check_struct_member_handles(
            struct, structs_with_objects, None, True
        )
    # Generate unwrap functions for any structs that were added to
    # the list.
    for key in structs_with_objects:
        if not self.is_struct_black_listed(key):
            self.write_struct_unwrap_def(key)
    write('template <typename T>', file=self.outFile)
    write(
        'T* MakeUnwrapStructs(const T* values, size_t len, HandleUnwrapMemory* unwrap_memory)',
        file=self.outFile
    )
    write('{', file=self.outFile)
    write(
        '    assert((values != nullptr) && (len > 0) && (unwrap_memory != nullptr));',
        file=self.outFile
    )
    self.newline()
    write(
        '    const uint8_t* bytes     = reinterpret_cast<const uint8_t*>(values);',
        file=self.outFile
    )
    write(
        '    size_t         num_bytes = len * sizeof(T);',
        file=self.outFile
    )
    self.newline()
    write(
        '    return reinterpret_cast<T*>(unwrap_memory->GetFilledBuffer(bytes, num_bytes));',
        file=self.outFile
    )
    write('}', file=self.outFile)
    self.newline()
    write('template <typename T>', file=self.outFile)
    write(
        'const T* UnwrapStructPtrObjects(const T* value, HandleUnwrapMemory* unwrap_memory)',
        file=self.outFile
    )
    write('{', file=self.outFile)
    write('    T* unwrapped_struct = nullptr;', file=self.outFile)
    self.newline()
    write('    if (value != nullptr)', file=self.outFile)
    write('    {', file=self.outFile)
    write(
        '        unwrapped_struct = MakeUnwrapStructs(value, 1, unwrap_memory);',
        file=self.outFile
    )
    write(
        '        UnwrapStructObjects(unwrapped_struct, unwrap_memory);',
        file=self.outFile
    )
    write('    }', file=self.outFile)
    self.newline()
    write('    return unwrapped_struct;', file=self.outFile)
    write('}', file=self.outFile)
    self.newline()
    write('template <typename T>', file=self.outFile)
    write(
        'const T* UnwrapStructArrayObjects(const T* values, size_t len, HandleUnwrapMemory* unwrap_memory)',
        file=self.outFile
    )
    write('{', file=self.outFile)
    write('    if ((values != nullptr) && (len > 0))', file=self.outFile)
    write('    {', file=self.outFile)
    write(
        '        auto unwrapped_structs = MakeUnwrapStructs(values, len, unwrap_memory);',
        file=self.outFile
    )
    self.newline()
    write('        for (size_t i = 0; i < len; ++i)', file=self.outFile)
    write('        {', file=self.outFile)
    write(
        '            UnwrapStructObjects(&unwrapped_structs[i], unwrap_memory);',
        file=self.outFile
    )
    write('        }', file=self.outFile)
    self.newline()
    write('        return unwrapped_structs;', file=self.outFile)
    write('    }', file=self.outFile)
    self.newline()
    write(
        '    // Leave the original memory in place when the pointer is not null, but size is zero.',
        file=self.outFile
    )
    write('    return values;', file=self.outFile)
    write('}', file=self.outFile)
    self.newline()
    write('GFXRECON_END_NAMESPACE(encode)', file=self.outFile)
    write('GFXRECON_END_NAMESPACE(gfxrecon)', file=self.outFile)
    # Finish processing in superclass
    Dx12BaseGenerator.METHOD_NAME(self)