@classmethod
def from_access(cls, access: TensorAccess, weight, task_type, front_boundary=None, back_boundary=None):
    return cls(access.tensor, weight, access.time, access.tensor.swap_time, task_type, front_boundary=front_boundary, back_boundary=back_boundary)
@classmethod
def from_access(cls, access: TensorAccess, weight, task_type, front_boundary=None, back_boundary=None):
    return cls(access.tensor, weight, access.time, access.tensor.swap_time, task_type, front_boundary=front_boundary, back_boundary=back_boundary)