import json


def learn_submit_template(content):
    """Infer the submission template from the pbsmrtpipe runnable-task.json file.
    """
    table = json.loads(content)
    cluster_table = table['cluster']
    if cluster_table is None:
        raise RuntimeError('No cluster information in "{}"'.format(content))
    start_string = cluster_table['start']
    stop_string = cluster_table['stop']
    return start_string, stop_string