code: def remove_file(filename, path=None):
      
      cwd = os.getcwd()
      try:
          if path:
              os.chdir(path)
      except OSError:
          raise
      try:
          os.remove(filename)
          os.chdir(cwd)
          return True
      except OSError:
          os.chdir(cwd)
          raise
docs: Remove file filename from path.
  
      :param filename: Name of file to remove
      :param path: Path where file is located
      :return: True if successfull
      :raises OSError if chdir or remove fails.