def _get_service_connection(self, service, service_command=None, create=True, timeout_ms=None):
        """
        Based on the service, get the AdbConnection for that service or create one if it doesnt exist

        :param service:
        :param service_command: Additional service parameters to append
        :param create: If False, dont create a connection if it does not exist
        :return:
        """

        connection = self._service_connections.get(service, None)

        if connection:
            return connection

        if not connection and not create:
            return None

        if service_command:
            destination_str = b'%s:%s' % (service, service_command)
        else:
            destination_str = service

        connection = self.protocol_handler.Open(
            self._handle, destination=destination_str, timeout_ms=timeout_ms)

        self._service_connections.update({service: connection})

        return connection

        Based on the service, get the AdbConnection for that service or create one if it doesnt exist

        :param service:
        :param service_command: Additional service parameters to append
        :param create: If False, dont create a connection if it does not exist
        :return:
        
adb/adb_commands.py