code: def shebang(self, new_shebang):
          
          if not self.shebang:
  
              raise ValueError('Cannot modify a shebang if it does not exist.')
  
          if not new_shebang.startswith('#!'):
  
              raise ValueError('Invalid shebang.')
  
          self.writeline(new_shebang, 0)
docs: Write a new shebang to the file.
  
          Raises:
              ValueError: If the file has no shebang to modify.
              ValueError: If the new shebang is invalid.