def get_adapter(obj):
    """
    Return an adapter object for Sage object `obj`.

    INPUT:

        - ``obj`` -- a Sage object

    OUTPUT: an adapter object

    TESTS ::

        sage: from sage_combinat_widgets.grid_view_editor import get_adapter
        sage: from sage.combinat.partition import Partition
        sage: p = Partition([3,2,1,1])
        sage: pa = get_adapter(p)
        sage: pa.cellzero
        False
        sage: from sage.combinat.tableau import StandardTableaux
        sage: t = StandardTableaux(7).random_element()
        sage: ta = get_adapter(t)
        sage: ta.cellzero
        0
    """
    from sage.combinat.partition import Partition
    if issubclass(obj.__class__, Partition):
        from sage_widget_adapters.combinat.partition_grid_view_adapter import PartitionGridViewAdapter
        return PartitionGridViewAdapter()
    from sage.combinat.skew_partition import SkewPartition
    if issubclass(obj.__class__, SkewPartition):
        from sage_widget_adapters.combinat.skew_partition_grid_view_adapter import SkewPartitionGridViewAdapter
        return SkewPartitionGridViewAdapter()
    from sage.combinat.tableau import Tableau
    if issubclass(obj.__class__, Tableau):
        from sage.combinat.tableau import SemistandardTableau, StandardTableau
        if issubclass(obj.__class__, StandardTableau):
            from sage_widget_adapters.combinat.tableau_grid_view_adapter import StandardTableauGridViewAdapter
            return StandardTableauGridViewAdapter()
        if issubclass(obj.__class__, SemistandardTableau):
            from sage_widget_adapters.combinat.tableau_grid_view_adapter import SemistandardTableauGridViewAdapter
            return SemistandardTableauGridViewAdapter()
        from sage_widget_adapters.combinat.tableau_grid_view_adapter import TableauGridViewAdapter
        return TableauGridViewAdapter()
    from sage.combinat.skew_tableau import SkewTableau
    if issubclass(obj.__class__, SkewTableau):
        from sage_widget_adapters.combinat.skew_tableau_grid_view_adapter import SkewTableauGridViewAdapter
        return SkewTableauGridViewAdapter()
    try:
        from sage.combinat.parallelogram_polyomino import ParallelogramPolyomino
        if issubclass(obj.__class__, ParallelogramPolyomino):
            from sage_widget_adapters.combinat.parallelogram_polyomino_grid_view_adapter import ParallelogramPolyominoGridViewAdapter
            return ParallelogramPolyominoGridViewAdapter()
    except:
        pass
    from sage.matrix.matrix2 import Matrix
    if issubclass(obj.__class__, Matrix):
        from sage_widget_adapters.matrix.matrix_grid_view_adapter import MatrixGridViewAdapter
        return MatrixGridViewAdapter(obj)
    from sage.graphs.graph import Graph
    if issubclass(obj.__class__, Graph):
        from sage_widget_adapters.graphs.graph_grid_view_adapter import GraphGridViewAdapter
        return GraphGridViewAdapter()
