def _has_len(data: Union[Sequence, Iterable]) -> bool:
    """Duck typing check to see if the argument supports getting the length.

    Args:
        data: The object to check for length support.

    """
    try:
        len(data)
        return True
    except (TypeError, NotImplementedError):
        return False
Duck typing check to see if the argument supports getting the length.

    Args:
        data: The object to check for length support.

    
src/flash/core/data/io/input.py