def METHOD_NAME(self, other):
    ''' Refine the object attributes when a shallow copy is not the most
    appropriate operation during a call to the copy() method.
    :param other: object we are copying from.
    :type other: :py:class:`psyclone.psyir.node.Node`
    '''
    super(ScopingNode, self).METHOD_NAME(other)
    self._symbol_table = other.symbol_table.deep_copy()
    # pylint: disable=protected-access
    self._symbol_table._node = self  # Associate to self
    # Update of children references to point to the equivalent symbols in
    # the new symbol table attached to self.
    # TODO #1377 Unfortunately Loop nodes currently store the associated
    # loop variable in a `_variable` property rather than as a child so we
    # must handle those separately. Also, in the LFRic API a Loop does not
    # initially have the `_variable` property set which means that calling
    # the `variable` getter causes an error (because it checks the
    # internal-consistency of the Loop node). We therefore have to check
    # the value of the 'private' `_variable` for now.
    # We have to import Loop here to avoid a circular dependency.
    # pylint: disable=import-outside-toplevel
    from psyclone.psyir.nodes.loop import Loop
    for node in self.walk((Reference, Loop)):
        if isinstance(node, Reference):
            if node.symbol in other.symbol_table.symbols:
                node.symbol = self.symbol_table.lookup(node.symbol.name)
        if isinstance(node, Loop) and node._variable:
            if node.variable in other.symbol_table.symbols:
                node.variable = self.symbol_table.lookup(
                    node.variable.name)