def patched_to_marshallable_type(obj):
    if obj is None:
        return None  # make it idempotent for None

    if hasattr(obj, '__getitem__'):
        return obj  # it is indexable it is ok

    if hasattr(obj, '__marshallable__'):
        return obj.__marshallable__()

    return dict(obj.__dict__)
Test if that the sync strategy is not returned if it has no argument.
dataset/ETHPy150Open fusic-com/flask-todo/utils/flaskutils/restful.py/patched_to_marshallable_type--crossover with--dataset/ETHPy150Open aws/aws-cli/tests/unit/customizations/s3/syncstrategy/test_base.py/TestBaseSync.test_no_use_sync_strategy_for_no_argument_specified