Accessing Items based on Path

I am currently working on a plugin for Beets.
I am attempting to access metadata of a file that is stored within the Beets library based on the path of the file. In short, I have a list of file paths that correspond to music files, and I want to grab metadata for each music file. I am currently trying to use the method beets.library.Library.items(), but I was unable to figure out how to create a query that works. I tried passing in a string like this: "path:C:\Users\beansman\Music\song1.mp3", but that didn’t work.
I also tried using AndQuery.from_strings which is recommended here:
The section states the following:

Beets has a human-writable plain-text query syntax that can be parsed into Query objects. Calling AndQuery.from_strings parses a list of query parts into a query object that can then be used with Library objects.
I was unable to find that method in the source code of Beets, with the closest method being beets.dbcore.queryparse.query_from_strings.

Am I missing something simple? I just want to be able to specify a path, get Item objects that are at the path, and then grab other metadata using the Item objects.

Hello! There is a special kind of query for looking things up by path:

You can construct a PathQuery and pass it to Library.items(). Here’s an example from the mpdstats plugin that does exactly this thing: