def METHOD_NAME(mod: torch.nn.Module) -> torch.dtype:
    """Guess floating dtype for module.
    Assumes no mixed precision.
    """
    # Try to a get a parameter
    a_buf = None
    for buf in mod.parameters():
        if buf.is_floating_point():
            a_buf = buf
            break
    if a_buf is None:
        # If there isn't one, try to get a buffer
        for buf in mod.buffers():
            if buf.is_floating_point():
                a_buf = buf
                break
    return a_buf.dtype if a_buf is not None else torch.get_default_dtype()