code: def _find_pvm(
      session: Session, view_name: str, permission_name: str
  ) -> PermissionView:
      return (
          session.query(PermissionView)
          .join(Permission)
          .join(ViewMenu)
          .filter(
              ViewMenu.name == view_name,
              Permission.name == permission_name,
          )
      ).one_or_none()
  
imports: import logging
  from dataclasses import dataclass
  from sqlalchemy import Column, ForeignKey, Integer, Sequence, String, Table, UniqueConstraint
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import Load, relationship, Session
label_desc: Use image node_id 4 for calling a global function with example usage: _find_pvm(session, view_name, permission_name) and returns: session