<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_md5(self, md5_output, pattern=r"^([a-fA-F0-9]+)$"):
 """ IOS-XR defaults with timestamps enabled # show md5 file /bootflash:/boot/grub/grub.cfg Sat Mar 3 17:49:03.596 UTC c84843f0030efd44b01343fdb8c2e801 """

        match = re.search(pattern, md5_output, flags=re.M)
        if match:
            return match.group(1)
        else:
            raise ValueError("Invalid output from MD5 command: {}".format(md5_output))