code: def perform_step(file_contents, step):
      
      assert type(file_contents) is not bytes
      xmldoc = parse(file_contents)
      return step(xmldoc)
docs: Performs a step of the transformation.
  
      :param text file_contents: Contends of the cheetah template
      :param function step: Function taking xmldoc and returning new contents
      :returns: new contents of the file.