<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sys_maxfd():
 """ Returns the maximum file descriptor limit. This is guaranteed to return a useful int value. """

    maxfd = None
    try:
        maxfd = int(resource.getrlimit(resource.RLIMIT_NOFILE)[0])
        if maxfd == resource.RLIM_INFINITY:                                                     # pragma: no cover
            maxfd = None
    except: pass
    if maxfd is None:
        maxfd = sys_maxfd.fallback_maxfd
    return maxfd