<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_dsdl_signature_source_definition(self):
 """ Returns normalized DSDL definition text. Please refer to the specification for details about normalized DSDL definitions. """

        txt = StringIO()
        txt.write(self.full_name + '\n')

        def adjoin(attrs):
            return txt.write('\n'.join(x.get_normalized_definition() for x in attrs) + '\n')

        if self.kind == CompoundType.KIND_SERVICE:
            if self.request_union:
                txt.write('\n@union\n')
            adjoin(self.request_fields)
            txt.write('\n---\n')
            if self.response_union:
                txt.write('\n@union\n')
            adjoin(self.response_fields)
        elif self.kind == CompoundType.KIND_MESSAGE:
            if self.union:
                txt.write('\n@union\n')
            adjoin(self.fields)
        else:
            error('Compound type of unknown kind [%s]', self.kind)
        return txt.getvalue().strip().replace('\n\n\n', '\n').replace('\n\n', '\n')