code: def clean_code(self, name, forbidden):
          
  
          code = self.read_code(name)
          code = code.split('\n')
          new_code = []
          for line in code:
              if [bad for bad in forbidden if bad in line]:
                  pass
              else:
                  allowed = ['time','timeit'] # Magics where we want to keep the command
                  line = self.strip_line_magic(line, allowed)
                  if isinstance(line,list):
                      line = ' '.join(line)
                  new_code.append(line)
          new_code = '\n'.join(new_code)
          self.write_code(name, new_code)
          return new_code
docs: Remove lines containing items in 'forbidden' from the code.
          Helpful for executing converted notebooks that still retain IPython
          magic commands.