def METHOD_NAME(response, has_trans=False, status_code=200):
    """
    Return a response as JSON. If you are just wrapping a view,
    then use the json_view decorator.
    """
    # to avoid circular imports with users.models
    from .utils import AMOJSONEncoder
    if has_trans:
        response = json.dumps(response, cls=AMOJSONEncoder)
    else:
        response = json.dumps(response)
    return http.HttpResponse(
        response, content_type='application/json', status=status_code
    )