def template_size(template):
    """
    Returns template width and height

    :type template: list of list of int
    :rtype: dict
    """
    size = {
        "width": max([len(row) for row in template]) if len(template) > 0 else 0,
        "height": len(template),
    }
    return size