<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reassemble(protocol, strict=False):
 """Reassemble fragmented datagrams. Keyword arguments: * protocol -- str, protocol to be reassembled * strict -- bool, if return all datagrams (including those not implemented) when submit (default is False) <keyword> True / False Returns: * [if protocol is IPv4] IPv4_Reassembly -- a Reassembly object from `pcapkit.reassembly` * [if protocol is IPv6] IPv6_Reassembly -- a Reassembly object from `pcapkit.reassembly` * [if protocol is TCP] TCP_Reassembly -- a Reassembly object from `pcapkit.reassembly` """

    if isinstance(protocol, type) and issubclass(protocol, Protocol):
        protocol = protocol.__index__()

    str_check(protocol)
    bool_check(strict)

    if protocol == 'IPv4':
        return IPv4_Reassembly(strict=strict)
    elif protocol == 'IPv6':
        return IPv6_Reassembly(strict=strict)
    elif protocol == 'TCP':
        return TCP_Reassembly(strict=strict)
    else:
        raise FormatError(f'Unsupported reassembly protocol: {protocol}')