def METHOD_NAME(ctx, stmt):
    if stmt.parent.search_one((smi_module_name, 'oid')) is not None:
        err_add(ctx.errors, stmt.pos, 'SMIv2_SUBID_AND_OID', ())
        return
    def find_ancestor_oid(s):
        if s.parent is None:
            return None
        if hasattr(s.parent, 'i_smi_oid'):
            return s.parent.i_smi_oid
        return find_ancestor_oid(s.parent)
    oid = find_ancestor_oid(stmt.parent)
    if oid is None:
        err_add(ctx.errors, stmt.pos, 'SMIv2_BAD_SUBID', ())
        return
    stmt.parent.i_smi_oid = oid + [int(stmt.arg)]