def _get_template_pool_lock(self, id):
try:<EOL><INDENT>return self._hosting_device_locks[id]<EOL><DEDENT>except KeyError:<EOL><INDENT>self._hosting_device_locks[id] = threading.Lock()<EOL>return self._hosting_device_locks.get(id)<EOL><DEDENT>
Returns lock object for hosting device template with <id>.