<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def uid_exists(uid):
 """Check if a uid exists"""

    try:
        pwd.getpwuid(uid)
        uid_exists = True
    except KeyError:
        uid_exists = False
    return uid_exists