class_docstr: Mask to keep track of discrete regions crossed by streamlines.
  
  The resolution of this grid determines the approximate spacing between
  trajectories. Streamlines are only allowed to pass through zeroed cells:
  When a streamline enters a cell, that cell is set to 1, and no new
  streamlines are allowed to enter.
class_docstr_tok: ["Mask","to","keep","track","of","discrete","regions","crossed","by","streamlines",".","The","resolution","of","this","grid","determines","the","approximate","spacing","between","trajectories",".","Streamlines","are","only","allowed","to","pass","through","zeroed","cells",":","When","a","streamline","enters","a","cell",",","that","cell","is","set","to","1",",","and","no","new","streamlines","are","allowed","to","enter","."]
docstr: Update current trajectory position in mask.
  
  If the new position has already been filled, raise `InvalidIndexError`.
docstr_tok: ["Update","current","trajectory","position","in","mask",".","If","the","new","position","has","already","been","filled",",","raise","`","InvalidIndexError","`","."]
code: def _update_trajectory(self, xm, ym, broken_streamlines=True):
      """
      Update current trajectory position in mask.
  
      If the new position has already been filled, raise `InvalidIndexError`.
      """
      if self._current_xy != (xm, ym):
          if self[ym, xm] == 0:
              self._traj.append((ym, xm))
              self._mask[ym, xm] = 1
              self._current_xy = (xm, ym)
          else:
              if broken_streamlines:
                  raise InvalidIndexError
              else:
                  pass
  
imports: import numpy
  import matplotlib
  from matplotlib import _api, cm, patches
  import matplotlib.colors
  import matplotlib.collections
  import matplotlib.lines
label_desc: Use image node_id 5 for calling the StreamMask obj's underlying member method code with example usage: obj._update_trajectory(xm, ym, broken_streamlines) without return types