def make_empty_files(files):
    for f in files:
        path = os.path.dirname(f)

        if path and not os.path.exists(path):
            try:
                os.makedirs(path)
            except OSError as e:
                logging.error('Unable to create directory %s: %s', path, e)
                continue

        try:
            with open(f, 'w'):
                # Set the file access and modified times to the current time.
                os.utime(f, None)
        except IOError as e:
            logging.error('Unable to create empty file %s: %s', f, e)
Run standard methods before  `INSERT` or `UPDATE`. Standard Methods are:
dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/filesystem.py/make_empty_files--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/model/document.py/Document.run_before_save_methods