<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_port(addr, user):
 """Find local port in existing tunnels"""

    import pwd
    home = pwd.getpwuid(os.getuid()).pw_dir
    for name in os.listdir('%s/.ssh/' % home):
        if name.startswith('unixpipe_%s@%s_' % (user, addr,)):
            return int(name.split('_')[2])