<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def join(self, other):
 """ Join two headings into a new one. It assumes that self and other are headings that share no common dependent attributes. """

        return Heading(
            [self.attributes[name].todict() for name in self.primary_key] +
            [other.attributes[name].todict() for name in other.primary_key if name not in self.primary_key] +
            [self.attributes[name].todict() for name in self.dependent_attributes if name not in other.primary_key] +
            [other.attributes[name].todict() for name in other.dependent_attributes if name not in self.primary_key])