code: def _set_visible(self, visibility, grid_index=None):
          
  
          if grid_index is None:
              for ax in self.flat_grid:
                  ax.set_visible(visibility)
          else:
              if grid_index < 0 or grid_index >= len(self.grids):
                  raise IndexError('Valid indices : 0 to {}'.format(len(self.grids) - 1))
              for ax in self.grids[grid_index]:
                  ax.set_visible(visibility)
docs: Sets the visibility property of all axes.