I might be wrong but I don’t think it’s actually necessary to import bpy_types… I used to and I don’t remember why. I just import the class through the bpy module directly.
from the (shift-f4) console you can type bpy.types. and then ctrl-space to see the list of types. bpy.types.GR completes to a few graph editor things and there is a GRAPH_MT_editor_menus. Is that what you wanted to hack on?
get a reference to the class you want to alter
from bpy.types import GRAPH_MT_editor_menus
now we need to unregister it
next make a poll func
return context.screen.name == "Data Analysis" # check for typo
put it on the class:
GRAPH_MT_editor_menus.poll = classmethod(mypoll)
and then of course register again
that may or may not work … I didn’t test so good luck