def location(self):
"""Get Location instance where this task is running.
Can also be used on remotely running tasks.
"""
if self._location:
return copy.copy(self._location)
return self._scheduler.location