class_docstr: Class that manages communication between a
  :class:`fiftyone.core.session.Session` and one or more
  :class:`fiftyone.core.plots.base.ResponsivePlot` instances.
  
  Each plot can be linked to either the view, samples, frames, or labels of a
  session:
  
  -   **View links:** When a plot has ``link_type == "view"``, then, when the
      session's view changes, the plot is updated based on the content of the
      view
  
  -   **Sample links:** When points are selected in a plot with
      ``link_type == "samples"``, a view containing the corresponding samples
      is loaded in the App. Conversely, when the session's view changes, the
      corresponding points are selected in the plot
  
  -   **Frame links:** When points are selected in a plot with
      ``link_type == "frames"``, a view containing the corresponding frames
      is loaded in the App. Conversely, when the session's view changes, the
      corresponding points are selected in the plot
  
  -   **Label links:** When points are selected in a plot with
      ``link_type == "labels"``, a view containing the corresponding labels
      is loaded in the App. Conversely, when the session's view changes, the
      points in the plot corresponding to all labels in the view are selected
      in the plot
  
  Args:
      session: a :class:`fiftyone.core.session.Session`
class_docstr_tok: ["Class","that","manages","communication","between","a",":","class",":","`","fiftyone.core.session.Session","`","and","one","or","more",":","class",":","`","fiftyone.core.plots.base.ResponsivePlot","`","instances",".","Each","plot","can","be","linked","to","either","the","view",",","samples",",","frames",",","or","labels","of","a","session",":","-","*","*","View","links",":","*","*","When","a","plot","has","``","link_type","==","``","view","''","``",",","then",",","when","the","session","'s","view","changes",",","the","plot","is","updated","based","on","the","content","of","the","view","-","*","*","Sample","links",":","*","*","When","points","are","selected","in","a","plot","with","``","link_type","==","``","samples","''","``",",","a","view","containing","the","corresponding","samples","is","loaded","in","the","App",".","Conversely",",","when","the","session","'s","view","changes",",","the","corresponding","points","are","selected","in","the","plot","-","*","*","Frame","links",":","*","*","When","points","are","selected","in","a","plot","with","``","link_type","==","``","frames","''","``",",","a","view","containing","the","corresponding","frames","is","loaded","in","the","App",".","Conversely",",","when","the","session","'s","view","changes",",","the","corresponding","points","are","selected","in","the","plot","-","*","*","Label","links",":","*","*","When","points","are","selected","in","a","plot","with","``","link_type","==","``","labels","''","``",",","a","view","containing","the","corresponding","labels","is","loaded","in","the","App",".","Conversely",",","when","the","session","'s","view","changes",",","the","points","in","the","plot","corresponding","to","all","labels","in","the","view","are","selected","in","the","plot","Args",":","session",":","a",":","class",":","`","fiftyone.core.session.Session","`"]
code: def _update_ids_from_session(self):
      session = self._session
      current_view = session._collection.view()
      has_view = session.view is not None
      has_selections = session.selected or session.selected_labels
  
      # If no view is loaded and nothing is selected, reset all plots
      if not has_view and not has_selections:
          self._current_sample_ids = None
          self._current_frame_ids = None
          self._current_labels = None
          return
  
      if self.has_sample_links:
          # If samples are selected in the App, only record those
          # Otherwise, record all samples in the view
          if session.selected:
              _view = current_view.select(session.selected)
          else:
              _view = current_view
  
          if isinstance(
              _view, (fop.PatchesView, fov.FramesView, foc.ClipsView)
          ):
              sample_ids = _view.values("sample_id")
          else:
              sample_ids = _view.values("id")
  
          self._current_sample_ids = sample_ids
  
      if self.has_frame_links:
          # If samples are selected in the App, only record their frame IDs
          # Otherwise, record all frame IDs in the view
          if session.selected:
              _view = current_view.select(session.selected)
          else:
              _view = current_view
  
          if isinstance(_view, fov.FramesView):
              frame_ids = _view.values("id")
          elif _view._contains_videos():
              frame_ids = _view.values("frames.id", unwind=True)
          else:
              frame_ids = None
  
          self._current_frame_ids = frame_ids
  
      if self.has_label_links:
          # If labels are selected in the App, only record those
          # If samples are selected in the App, only record their labels
          # Otherwise, record all labels in the current view
          if session.selected_labels:
              labels = session.selected_labels
          else:
              if session.selected:
                  _view = current_view.select(session.selected)
              else:
                  _view = current_view
  
              labels = _view._get_selected_labels()
  
          self._current_labels = labels
  
imports: import datetime
  import itertools
  import logging
  from bson import ObjectId
  import eta.core.utils
  import fiftyone.core.clips
  from fiftyone.core.expressions import ViewField
  import fiftyone.core.patches
  import fiftyone.core.video
  from .base import ResponsivePlot, ViewPlot, InteractivePlot
label_desc: Use image node_id 35 for calling the PlotManager obj's underlying member method code with example usage: obj._update_ids_from_session() without return types