<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matched(self, other):
 """Returns True if the two ValueElement instances differ only by name, default value or some other inconsequential modifier. """

        mods = ["allocatable", "pointer"]
        return (self.kind.lower() == other.kind.lower() and
                self.dtype.lower() == other.dtype.lower() and
                self.D == other.D and
                all([m in other.modifiers for m in self.modifiers if m in mods]))