<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attrib(self):
 """ General XML element attributes for a seismic source, as a dict. """

        return dict([
            ('id', str(self.id)),
            ('name', str(self.name)),
            ('tectonicRegion', str(self.trt)),
        ])