<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isLoopback (self, ifname):
 """Check whether interface is a loopback device. @param ifname: interface name @type ifname: string """

        # since not all systems have IFF_LOOPBACK as a flag defined,
        # the ifname is tested first
        if ifname.startswith('lo'):
            return True
        return (self.getFlags(ifname) & self.IFF_LOOPBACK) != 0