def METHOD_NAME(org_id):
    org_id = int(org_id)
    org = ccnet_api.get_org_by_id(org_id)
    if org:
        users =ccnet_api.get_org_emailusers(org.url_prefix, -1, -1)
        for u in users:
            ccnet_api.remove_org_user(org_id, u.email)
        groups = ccnet_api.get_org_groups(org.org_id, -1, -1)
        for g in groups:
            ccnet_api.remove_org_group(org_id, g.gid)
        # remove org repos
        seafserv_threaded_rpc.remove_org_repo_by_org_id(org_id)
        # remove org
        ccnet_api.METHOD_NAME(org_id)