code: def write_to_file(file_path, data, mkdir=False):
      
      folder, fname = os.path.split(file_path)
      return write_to_file_by_name(folder, fname, data, mkdir)
docs: Write a string of data to file.
  
      Args:
          file_path: Full path for a valid file path (e.g. c:/ladybug/testPts.pts)
          data: Any data as string
          mkdir: Set to True to create the directory if doesn't exist (Default: False)