def _get_parallel_updates_semaphore(self):
    'Get or create a semaphore for parallel updates.'
    if (self.parallel_updates_semaphore is None):
        self.parallel_updates_semaphore = asyncio.Semaphore((self.parallel_updates if self.parallel_updates else 1), loop=self.hass.loop)
    return self.parallel_updates_semaphore
Get or create a semaphore for parallel updates.
def _get_parallel_updates_semaphore(self):
    
    if (self.parallel_updates_semaphore is None):
        self.parallel_updates_semaphore = asyncio.Semaphore((self.parallel_updates if self.parallel_updates else 1), loop=self.hass.loop)
    return self.parallel_updates_semaphore