def _get_activity_rights(activity_type, activity_id):
 if (activity_type == feconf.ACTIVITY_TYPE_EXPLORATION):
  return get_exploration_rights(activity_id, strict=False)
 elif (activity_type == feconf.ACTIVITY_TYPE_COLLECTION):
  return get_collection_rights(activity_id, strict=False)
 else:
  raise Exception(('Cannot get activity rights for unknown activity type: %s' % activity_type))

def _get_activity_rights ( activity_type , activity_id ) : if ( activity_type == feconf . ACTIVITY_TYPE_EXPLORATION ) : return get_exploration_rights ( activity_id , strict = False ) elif ( activity_type == feconf . ACTIVITY_TYPE_COLLECTION ) : return get_collection_rights ( activity_id , strict = False ) else : raise Exception ( ( 'Cannot get activity rights for unknown activity type: %s' % activity_type ) )
this function returns none if this function fails to retrieve the rights object for a given activity based on its type .