def to_amino(x: Any) -> Any:
    if ('to_amino' in dir(x)):
        return x.to_amino()
    if isinstance(x, list):
        return [to_data(g) for g in x]
    if isinstance(x, dict):
        return dict_to_amino(x)
    if isinstance(x, int):
        return str(x)
    if isinstance(x, datetime):
        return to_isoformat(x)
def to_amino(x: Any) -> Any:
    if ('to_amino' in dir(x)):
        return x.to_amino()
    if isinstance(x, list):
        return [to_data(g) for g in x]
    if isinstance(x, dict):
        return dict_to_amino(x)
    if isinstance(x, int):
        return str(x)
    if isinstance(x, datetime):
        return to_isoformat(x)