code: def locate_item(ident, stateless=False, cache_id=None):
          '''Locate a dash application, given either the
          slug of an instance or the name for a stateless app'''
          if stateless:
              dash_app = find_stateless_by_name(ident)
          else:
              dash_app = get_object_or_404(DashApp, slug=ident)
  
          app = dash_app.as_dash_instance(cache_id=cache_id)
          return dash_app, apf locate_item(ident, stateless=False, cache_id=None):
          '''Locate a dash application, given either the
          slug of an instance or the name for a stateless app'''
          if stateless:
              dash_app = find_stateless_by_name(ident)
          else:
              dash_app = get_object_or_404(DashApp, slug=ident)
  
          app = dash_app.as_dash_instance(cache_id=cache_id)
          return dash_app, app
docs: Locate a dash application, given either the
          slug of an instance or the name for a stateless app