<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_group_id(groupname):
 """ Returns the group id to a given group name. Returns ``None`` if the group does not exist. :param groupname: Group name. :type groupname: unicode :return: Group id. :rtype: int """

    gid = single_line_stdout('id -g {0}'.format(groupname), expected_errors=(1,), shell=False)
    return check_int(gid)