docstr: Reload source from disk and initialize state.
docstr_tok: ["Reload","source","from","disk","and","initialize","state","."]
code: def reload(self):
      """Reload source from disk and initialize state."""
      self.fload()
  
      self.src = "".join(openpy.strip_encoding_cookie(self.fobj))
      src_b = [b.strip() for b in self.re_stop.split(self.src) if b]
      self._silent = [bool(self.re_silent.findall(b)) for b in src_b]
      self._auto = [bool(self.re_auto.findall(b)) for b in src_b]
  
      # if auto_all is not given (def. None), we read it from the file
      if self.auto_all is None:
          self.auto_all = bool(self.re_auto_all.findall(src_b[0]))
      else:
          self.auto_all = bool(self.auto_all)
  
      # Clean the sources from all markup so it doesn't get displayed when
      # running the demo
      src_blocks = []
      auto_strip = lambda s: self.re_auto.sub("", s)
      for i, b in enumerate(src_b):
          if self._auto[i]:
              src_blocks.append(auto_strip(b))
          else:
              src_blocks.append(b)
      # remove the auto_all marker
      src_blocks[0] = self.re_auto_all.sub("", src_blocks[0])
  
      self.nblocks = len(src_blocks)
      self.src_blocks = src_blocks
  
      # also build syntax-highlighted source
      self.src_blocks_colored = list(
          map(self.highlight, self.src_blocks)
      )
  
      # ensure clean namespace and seek offset
      self.reset()
  
imports: import os
  import re
  import shlex
  import sys
  import pygments
  from pathlib import Path
  from IPython.utils.text import marquee
  from IPython.utils import openpy
  from IPython.utils import py3compat
label_desc: Use image node_id 3 for calling the Demo obj's underlying member method code with example usage: obj.reload() without return types