def prefer_xmodules(identifier, entry_points):
 from_xmodule = [entry_point for entry_point in entry_points if (entry_point.dist.key == 'xmodule')]
 if from_xmodule:
  return default_select(identifier, from_xmodule)
 else:
  return default_select(identifier, entry_points)

def prefer_xmodules ( identifier , entry_points ) : from_xmodule = [ entry_point for entry_point in entry_points if ( entry_point . dist . key == 'xmodule' ) ] if from_xmodule : return default_select ( identifier , from_xmodule ) else : return default_select ( identifier , entry_points )
prefer entry_points from the xmodule package .