<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_field(field, slog, fl=False):
 """parse sample log for field set fl=True to return a float otherwise, returns int """

        field += r'\:\s+([\d\.]+)'
        match = re.search(field, slog)
        if match:
            if fl:
                return float(match.group(1))
            return int(match.group(1))
        return 0