def _tem_writer(tem_name, shape, line_data):
    """ User accessible version of Modellers tem_writer function, for saving templates.
    """
    with open(tem_name, 'w') as tem_file:
        tem_file.write('%s\n' % len(shape))
        for line in shape.astype('str').tolist():
            tem_file.write('\t'.join(line) + '\n')
        for line_value in line_data:
            tem_file.write('%s\n' % ' '.join(line_value))
