original_docstring:  with is a contextual option that handles both opening and closing of files to avoid
          issues with forgetting to close
          
docstring: with is a contextual option that handles both opening and closing of files to avoid
  issues with forgetting to close
docstring_tokens: with is a contextual option that handles both opening and closing of files to avoid issues with forgetting to close
code: def load_data(self):
          print("load data is called...")
          # sets up directory name
          self.dir = path.dirname(__file__)
          img_dir = path.join(self.dir, 'img')
          # opens file with write options
          ''' with is a contextual option that handles both opening and closing of files to avoid
          issues with forgetting to close
          '''
          try:
              # changed to r to avoid overwriting error
              with open(path.join(self.dir, "highscore.txt"), 'r') as f:
                  self.highscore = int(f.read())
                  print(self.highscore)
          except:
              with open(path.join(self.dir, HS_FILE), 'w') as f:
                  self.highscore = 0
                  print("exception")
          # load spritesheet image
          self.spritesheet = Spritesheet(path.join(img_dir, SPRITESHEET))       
          # load sounds
          # these were imported from various websites 
          self.snd_dir = path.join(self.dir, 'snd')
          self.jump_sound = [pg.mixer.Sound(path.join(self.snd_dir, 'Jump18.wav')),
                              pg.mixer.Sound(path.join(self.snd_dir, 'Jump24.wav'))]
          self.boost_sound = pg.mixer.Sound(path.join(self.snd_dir, 'moneyReal.wav'))
          #Sounds for when you hit the evil bird things
          self.birdy_sound = pg.mixer.Sound(path.join(self.snd_dir, 'Jump29.wav'))
          #When yoy hit them from anywhere not the top (when it kills you)
          self.birdyLeft_sound = pg.mixer.Sound(path.join(self.snd_dir, 'mario.wav'))
code_tokens: def load_data ( self ) : print ( "load data is called..." ) self . dir = path . dirname ( __file__ ) img_dir = path . join ( self . dir , 'img' ) try : with open ( path . join ( self . dir , "highscore.txt" ) , 'r' ) as f : self . highscore = int ( f . read ( ) ) print ( self . highscore ) except : with open ( path . join ( self . dir , HS_FILE ) , 'w' ) as f : self . highscore = 0 print ( "exception" ) self . spritesheet = Spritesheet ( path . join ( img_dir , SPRITESHEET ) ) self . snd_dir = path . join ( self . dir , 'snd' ) self . jump_sound = [ pg . mixer . Sound ( path . join ( self . snd_dir , 'Jump18.wav' ) ) , pg . mixer . Sound ( path . join ( self . snd_dir , 'Jump24.wav' ) ) ] self . boost_sound = pg . mixer . Sound ( path . join ( self . snd_dir , 'moneyReal.wav' ) ) self . birdy_sound = pg . mixer . Sound ( path . join ( self . snd_dir , 'Jump29.wav' ) ) self . birdyLeft_sound = pg . mixer . Sound ( path . join ( self . snd_dir , 'mario.wav' ) )
short_docstring: with is a contextual option that handles both opening and closing of files to avoid
  issues with forgetting to close
short_docstring_tokens: with is a contextual option that handles both opening and closing of files to avoid issues with forgetting to close
comment: # sets up directory name$SEP$# opens file with write options$SEP$''' with is a contextual option that handles both opening and closing of files to avoid
          issues with forgetting to close
          '''$SEP$# changed to r to avoid overwriting error$SEP$# load spritesheet image$SEP$# load sounds$SEP$# these were imported from various websites $SEP$#Sounds for when you hit the evil bird things$SEP$#When yoy hit them from anywhere not the top (when it kills you)