async def subscribe(self, channels):
ws_channels = []<EOL>nats_channels = []<EOL>for c in channels:<EOL><INDENT>if c.startswith(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',)):<EOL><INDENT>nats_channels.append(c)<EOL><DEDENT>else:<EOL><INDENT>ws_channels.append(c)<EOL><DEDENT><DEDENT>if len(ws_channels) > <NUM_LIT:0>:<EOL><INDENT>await self._ensure_ws()<EOL>await self._ws.send(json.dumps({<EOL>'<STR_LIT:action>': '<STR_LIT>',<EOL>'<STR_LIT:data>': {<EOL>'<STR_LIT>': ws_channels,<EOL>}<EOL>}))<EOL><DEDENT>if len(nats_channels) > <NUM_LIT:0>:<EOL><INDENT>await self._ensure_nats()<EOL>await self.polygon.subscribe(nats_channels)<EOL><DEDENT>
Start subscribing channels.
        If the necessary connection isn't open yet, it opens now.