<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(self, callback=None, errback=None, reload=False):
 """ Load network data from the API. """

        if not reload and self.data:
            raise NetworkException('Network already loaded')

        def success(result, *args):
            self.data = result
            self.id = result['id']
            self.name = result['name']
            self.report = self._rest.report(self.id)
            if callback:
                return callback(self)
            else:
                return self

        if self.id is None:
            if self.name is None:
                raise NetworkException('Must at least specify an id or name')
            else:
                self.id = [network for network in self._rest.list()
                           if network['name'] == self.name][0]['id']

        return self._rest.retrieve(self.id, callback=success,
                                   errback=errback)