<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def multicall(self, viewname, fields):
 """ Query the given fields of items in the given view. The result list contains named tuples, so you can access the fields directly by their name. """

        commands = tuple('d.{}='.format(x) for x in fields)
        result_type = namedtuple('DownloadItem', [x.replace('.', '_') for x in fields])
        items = self.open().d.multicall(viewname, *commands)
        return [result_type(*x) for x in items]