def METHOD_NAME(self, dim=None, dtype=np.float64):
    gdof = self.number_of_global_dofs()
    if dim is None:
        shape = gdof
    elif type(dim) is int:
        shape = (gdof, dim)
    elif type(dim) is tuple:
        shape = (gdof, ) + dim
    return np.zeros(shape, dtype=dtype)