def _parse_resource_type(scopes):
    from msrestazure.tools import parse_resource_id
    from azure.cli.core import CLIError
    namespace = None
    resource_type = None
    for item in scopes:
        item_namespace = parse_resource_id(item)['namespace']
        item_resource_type = parse_resource_id(item)['resource_type']
        if ((namespace is None) and (resource_type is None)):
            namespace = item_namespace
            resource_type = item_resource_type
        elif ((namespace != item_namespace) or (resource_type != item_resource_type)):
            raise CLIError('Multiple scopes should be the same resource type.')
    return ((namespace + '/') + resource_type)
def _parse_resource_type(scopes):
    from msrestazure.tools import parse_resource_id
    from azure.cli.core import CLIError
    namespace = None
    resource_type = None
    for item in scopes:
        item_namespace = parse_resource_id(item)['namespace']
        item_resource_type = parse_resource_id(item)['resource_type']
        if ((namespace is None) and (resource_type is None)):
            namespace = item_namespace
            resource_type = item_resource_type
        elif ((namespace != item_namespace) or (resource_type != item_resource_type)):
            raise CLIError('Multiple scopes should be the same resource type.')
    return ((namespace + '/') + resource_type)