def METHOD_NAME(q, is_exact=False):
    orgs = STP.objects.all()
    if is_exact:
        orgs = orgs.filter(Q(code=q) | Q(name=q))
    elif q:
        orgs = orgs.filter(Q(code__istartswith=q) | Q(name__icontains=q))
    org_values = orgs.values("name", "code")
    for org in org_values:
        org["code"] = org.pop("code")
        org["id"] = org["code"]
        org["type"] = "stp"
    return org_values