Rather than take the namespace from the file, you should hard-code the LTI namespace here.  We don't want to accept any namespace, we want the particular one named in the spec.  Also, using [0] on a dict's values means you will get an arbitrary one.