@register.tag
def membersof(parser, token):
	params=token.split_contents()
	tag = params[0]
	
	if len(params) < 6:
		raise template.TemplateSyntaxError('"%s" template tag requires six parameters' % tag)
		
	if params[2] != 'with':
		raise template.TemplateSyntaxError('"%s" template tag requires the third parameter to be "with"' % tag)
	
	try:
		app_label, model = params[3].strip('"').split('.')
		ct = ContentType.objects.get_by_natural_key(app_label, model)
	except ValueError:
		raise template.TemplateSyntaxError('"%s" template tag option "with" requires an argument of the form app_label.model (see django.contrib.contenttypes)' % tag)
	except ContentType.DoesNotExist:
		raise template.TemplateSyntaxError('"%s" template tag option "with" requires an argument of the form app_label.model which refers to an installed content type (see django.contrib.contenttypes)' % tag)
		
	if params[4] != 'as':
		raise template.TemplateSyntaxError('"%s" template tag requires the fifth parameter to be "as"' % tag)
	
	return MembersofNode(collection=params[1], model=ct.model_class(), as_var=params[5])
network-service-policy-list -P.
dataset/ETHPy150Open ithinksw/philo/philo/templatetags/collections.py/membersof--crossover with--dataset/ETHPy150Open openstack/python-group-based-policy-client/gbpclient/tests/unit/test_cli20_networkservicepolicy.py/CLITestV20NetworkServicePolicyJSON.test_list_network_service_polices_limit