def METHOD_NAME (my_path, is_dir, my_owner, my_group, my_bits, must_exist=True):
    if not os.path.exists(my_path):
        if must_exist:
            print("ERROR! "+my_path+" does not exist\n", file=sys.stderr)
            return False
        else:
            return True
    ret_val = True
    try:
        pwd.getpwnam(my_owner)
    except KeyError:
        print("ERROR! user "+my_owner+" does not exist\n", file=sys.stderr)
        ret_val = False
    try:
        grp.getgrnam(my_group)
    except KeyError:
        print("ERROR! group "+my_group+" does not exist\n", file=sys.stderr)
        ret_val = False
    if is_dir and not os.path.isdir(my_path):
        print("ERROR! "+my_path+" should be a directory!\n", file=sys.stderr)
        ret_val = False
    elif not is_dir and os.path.isdir(my_path):
        print("ERROR! "+my_path+" should not be a directory!\n", file=sys.stderr)
        ret_val = False
    if pwd.getpwuid(os.stat(my_path).st_uid).pw_name != my_owner:
        print("ERROR! "+my_path+" should be owned by "+my_owner+"\n", file=sys.stderr)
        ret_val = False
    if grp.getgrgid(os.stat(my_path).st_gid).gr_name != my_group:
        print("ERROR! "+my_path+" should be group "+my_group+"\n", file=sys.stderr)
        ret_val = False
    bits = os.stat(my_path)[stat.ST_MODE]
    bits &= 0o777
    if bits != my_bits:
        print("ERROR! "+my_path+" permission is "+oct(bits)+" should be "+oct(my_bits)+"\n", file=sys.stderr)
        ret_val = False
    return ret_val