human
I wrote the below code

    def gather_map(outputs):
        out = outputs[0]
        if isinstance(out, Variable):
            return Gather(target_device, dim=dim)(*outputs)
        if (out is None):
            return None
        return type(out)(map(gather_map, zip(*outputs)))
    return gather_map(outputs)

What's a good function header?
assistant
#Here's a good function header.

def gather(outputs, target_device, dim=0):