def METHOD_NAME(vol):
    # the input can be a class UserInfo or a Box
    if isinstance(vol, gate.UserInfo):
        vd = vol.__dict__
    else:
        vd = vol
    if "rotation" not in vd:
        gate.fatal(f'Cannot find the key "rotation" into this volume: {vol}')
    return rot_np_as_g4(vol.rotation)