<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def signature_type(self):
 """Return the signature type used in this MAR. Returns: One of None, 'unknown', 'sha1', or 'sha384' """

        if not self.mardata.signatures:
            return None

        for sig in self.mardata.signatures.sigs:
            if sig.algorithm_id == 1:
                return 'sha1'
            elif sig.algorithm_id == 2:
                return 'sha384'
        else:
            return 'unknown'