def _get_role_name(role):
 if isinstance(role, dict):
  return role['role']
 elif isinstance(role, basestring):
  return role
 else:
  LOGGER.warning(('role %s could not be resolved to a role name.' % role))
  return None

def _get_role_name ( role ) : if isinstance ( role , dict ) : return role [ 'role' ] elif isinstance ( role , basestring ) : return role else : LOGGER . warning ( ( 'role %s could not be resolved to a role name.' % role ) ) return None
resolves a role name from either a simple declaration or a dictionary style declaration .