def _mapper_or_none(entity):
 insp = inspection.inspect(entity, False)
 if (insp is not None):
  return insp.mapper
 else:
  return None

def _mapper_or_none ( entity ) : insp = inspection . inspect ( entity , False ) if ( insp is not None ) : return insp . mapper else : return None
return the :class: .