parameters: (
      organization_id, backend=None, queryset=None, model=None
  )
return_statement: return queryset
docstring: Adds organization filtering to default template queryset:
          filter only templates belonging to same organization
          or shared templates (with organization=None)
      This function is used in:
          * openwisp_controller.config.Template.get_default_templates
          * openwisp_controller.config.views.get_default_templates
docstring_summary: Adds organization filtering to default template queryset:
          filter only templates belonging to same organization
          or shared templates (with organization=None)
      This function is used in:
          * openwisp_controller.config.Template.get_default_templates
          * openwisp_controller.config.views.get_default_templates
docstring_tokens: Adds organization filtering to default template queryset : filter only templates belonging to same organization or shared templates ( with organization = None ) This function is used in : * openwisp_controller . config . Template . get_default_templates * openwisp_controller . config . views . get_default_templates
function: def get_default_templates_queryset(
      organization_id, backend=None, queryset=None, model=None
  ):
      """
      Adds organization filtering to default template queryset:
          filter only templates belonging to same organization
          or shared templates (with organization=None)
      This function is used in:
          * openwisp_controller.config.Template.get_default_templates
          * openwisp_controller.config.views.get_default_templates
      """
      if queryset is None:
          queryset = model.objects.filter(default=True)
      if organization_id:
          queryset = queryset.filter(
              Q(organization_id=organization_id) | Q(organization_id=None)
          ).order_by('-required', 'name')
      if backend:
          queryset = queryset.filter(backend=backend)
      return queryset
function_tokens: def get_default_templates_queryset ( organization_id , backend = None , queryset = None , model = None ) : if queryset is None : queryset = model . objects . filter ( default = True ) if organization_id : queryset = queryset . filter ( Q ( organization_id = organization_id ) | Q ( organization_id = None ) ) . order_by ( '-required' , 'name' ) if backend : queryset = queryset . filter ( backend = backend ) return queryset