legal constraints in AI