BVHTree.FromObject and "depsgraph"

The following code is trying to find out the objects with name start with “M” overlapping with any of the objects in the scene.

I however couldn/t make sense of how BVHTREE and overlap() works.

Console Error: keep saying
expected 'Depsgraph' type found 'Scene' instead

I am not sure what is Depsgraph and how to get it, can someone kindly show me an example code of that? Googled around and every one is using bpy.context.scene as the second argument of the FromObject() function but not working:

BVHTree.FromObject(obj, bpy.context.scene).overlap(BVHTree.FromObject(obj2, bpy.context.scene))

Here’s my full code

import bpy
from mathutils.bvhtree import BVHTree
for obj in bpy.context.scene.objects:
    if obj.name.startswith("M"):
        for obj2 in bpy.context.scene.objects:
            BVHTree.FromObject(obj, bpy.context.scene).overlap(BVHTree.FromObject(obj2, bpy.context.scene))