<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_roles_by_type(self, role_type, view = None):
 """ Get all roles of a certain type in a service. @param role_type: Role type @param view: View to materialize ('full' or 'summary') @return: A list of ApiRole objects. """

    return roles.get_roles_by_type(self._get_resource_root(), self.name,
        role_type, self._get_cluster_name(), view)