parameters: (devices)
return_statement: return links
docstring: \
      search all /dev devices and look for symlinks to known ports already
      listed in devices.
docstring_summary: \
      search all /dev devices and look for symlinks to known ports already
      listed in devices.
docstring_tokens: \ search all / dev devices and look for symlinks to known ports already listed in devices .
function: def list_links(devices):
      """\
      search all /dev devices and look for symlinks to known ports already
      listed in devices.
      """
      links = []
      for device in glob.glob('/dev/*'):
          if os.path.islink(device) and os.path.realpath(device) in devices:
              links.append(device)
      return links
function_tokens: def list_links ( devices ) : links = [ ] for device in glob . glob ( '/dev/*' ) : if os . path . islink ( device ) and os . path . realpath ( device ) in devices : links . append ( device ) return links