code: def create_file(self, filename, indented_data=None):
          
          filedir, filename = os.path.split(filename)
          if filedir:
              self.create_directory(filedir)
          path = os.path.join(self.path, filedir, filename)
          data = indented_data
          if isinstance(data, bytes) and not isinstance(data, str):
              # This is binary data rather than text.
              mode = 'wb'
          else:
              mode = 'w'
              if data:
                  data = textwrap.dedent(data)
          with open(path, mode) as fi:
              if data:
                  fi.write(data)
          return path
docs: Create a file in the temporary directory.
  
          Dedents the contents.