from typing import Any
from typing import TypeGuard
from typing import Sized


def is_sized(x: Any) -> TypeGuard[Sized]:
    """Return true if x is a sized object."""
    try:
        length = len(x)  # noqa: F841
        return True
    except TypeError:
        return False