(layout, placeholder, plugin_uid, position,
                       check_boundaries=False, fail_silently=True)
return occupied_cells
Get cells occupied by the given dashboard entry.

    :param dash.base.BaseDashboardLayout layout: Instance of
        subclassed ``dash.base.BaseDashboardLayout`` object.
    :param dash.base.BaseDashboardPlaceholder placeholder: Instance of
        subclassed ``dash.base.BaseDashboardPlaceholder`` object.
    :param string plugin_uid: UID of the plugin to check against.
    :param int position: Position of the plugin to check against.
    :param bool check_boundaries: If set to True, boundaries of the
        placeholders are also considered.
    :param bool fail_silently: If set to True, no exceptions are raised.
    :return mixed: Returns a list (could be an empty list as well) if all
        goes well and returns boolean False if out of the placeholder
        boundaries.
Get cells occupied by the given dashboard entry.
Get cells occupied by the given dashboard entry .
def get_occupied_cells(layout, placeholder, plugin_uid, position,
                       check_boundaries=False, fail_silently=True):
    """
    Get cells occupied by the given dashboard entry.

    :param dash.base.BaseDashboardLayout layout: Instance of
        subclassed ``dash.base.BaseDashboardLayout`` object.
    :param dash.base.BaseDashboardPlaceholder placeholder: Instance of
        subclassed ``dash.base.BaseDashboardPlaceholder`` object.
    :param string plugin_uid: UID of the plugin to check against.
    :param int position: Position of the plugin to check against.
    :param bool check_boundaries: If set to True, boundaries of the
        placeholders are also considered.
    :param bool fail_silently: If set to True, no exceptions are raised.
    :return mixed: Returns a list (could be an empty list as well) if all
        goes well and returns boolean False if out of the placeholder
        boundaries.
    """
    assert isinstance(layout, BaseDashboardLayout)
    # assert issubclass(placeholder, BaseDashboardPlaceholder)

    widget_cls = plugin_widget_registry.get(
        PluginWidgetRegistry.namify(layout.uid, placeholder.uid, plugin_uid)
    )
    occupied_cells = []
    placeholder_max_cell_num = placeholder.cols * placeholder.rows

    try:
        position = int(position)
    except Exception as err:
        if fail_silently:
            return False
        else:
            raise err

    if widget_cls:

        # First check the basic things.
        if check_boundaries:
            # Checking if widget isn't touching the boundaries. Checking the
            # widget width.
            relative_col_num = position % placeholder.cols
            if 0 == relative_col_num:
                relative_col_num = placeholder.cols

            if (relative_col_num + widget_cls.cols - 1) > placeholder.cols:
                if fail_silently:
                    return False
                else:
                    raise PluginWidgetOutOfPlaceholderBoundaries(
                        "Widget is out of placeholder boundaries."
                    )

            # Checking if widget isn't touching the boundaries. Checking the
            # widget height.
            # relative_row_num = position % placeholder.rows
            # if 0 == relative_row_num:
            #     relative_row_num = placeholder.rows
            # if (relative_row_num + widget_cls.rows - 1) > placeholder.rows:
            #     if fail_silently:
            #         return False
            #     else:
            #         raise PluginWidgetOutOfPlaceholderBoundaries(
            #             "Widget is out of placeholder boundaries."
            #         )

        # Now check the collision with other plugin widgets.
        for row in range(0, widget_cls.rows):
            for col in range(0, widget_cls.cols):
                cell_num = position + col + (row * placeholder.cols)

                if check_boundaries and cell_num > placeholder_max_cell_num:
                    if fail_silently:
                        return False
                    else:
                        raise PluginWidgetOutOfPlaceholderBoundaries(
                            "Widget is out of placeholder boundaries."
                        )
                occupied_cells.append(cell_num)

    return occupied_cells
def get_occupied_cells ( layout , placeholder , plugin_uid , position , check_boundaries = False , fail_silently = True ) : assert isinstance ( layout , BaseDashboardLayout ) # assert issubclass(placeholder, BaseDashboardPlaceholder) widget_cls = plugin_widget_registry . get ( PluginWidgetRegistry . namify ( layout . uid , placeholder . uid , plugin_uid ) ) occupied_cells = [ ] placeholder_max_cell_num = placeholder . cols * placeholder . rows try : position = int ( position ) except Exception as err : if fail_silently : return False else : raise err if widget_cls : # First check the basic things. if check_boundaries : # Checking if widget isn't touching the boundaries. Checking the # widget width. relative_col_num = position % placeholder . cols if 0 == relative_col_num : relative_col_num = placeholder . cols if ( relative_col_num + widget_cls . cols - 1 ) > placeholder . cols : if fail_silently : return False else : raise PluginWidgetOutOfPlaceholderBoundaries ( "Widget is out of placeholder boundaries." ) # Checking if widget isn't touching the boundaries. Checking the # widget height. # relative_row_num = position % placeholder.rows # if 0 == relative_row_num: #     relative_row_num = placeholder.rows # if (relative_row_num + widget_cls.rows - 1) > placeholder.rows: #     if fail_silently: #         return False #     else: #         raise PluginWidgetOutOfPlaceholderBoundaries( #             "Widget is out of placeholder boundaries." #         ) # Now check the collision with other plugin widgets. for row in range ( 0 , widget_cls . rows ) : for col in range ( 0 , widget_cls . cols ) : cell_num = position + col + ( row * placeholder . cols ) if check_boundaries and cell_num > placeholder_max_cell_num : if fail_silently : return False else : raise PluginWidgetOutOfPlaceholderBoundaries ( "Widget is out of placeholder boundaries." ) occupied_cells . append ( cell_num ) return occupied_cells