Move two library calls into the function that uses them
Move two library calls into the function that uses them

I just did this to be more consistent with the rest of the codebase

DataONEorg/semantic-query,DataONEorg/semantic-query,DataONEorg/semantic-query