def parse_clip_name(stdout_file):
    """ Parses the name of the clip from the stdout.txt of the job's run. """
    with open(stdout_file, 'r') as f:
        for line in f.readlines():
            if 'FLAGS.clip_name' in line:
                return line.split()[-1]
    raise Exception("Unable to identify clip_name in: '{}'".format(stdout_file))