def _find_server(account, servername=None):
servers = servers = [s for s in account.resources() if '<STR_LIT>' in s.provides]<EOL>if servername is not None:<EOL><INDENT>for server in servers:<EOL><INDENT>if server.name == servername:<EOL><INDENT>return server.connect()<EOL><DEDENT><DEDENT>raise SystemExit('<STR_LIT>' % servername)<EOL><DEDENT>return utils.choose('<STR_LIT>', servers, '<STR_LIT:name>').connect()<EOL>
Find and return a PlexServer object.