code: def _gen_4spec(op, path, value,
                 create_path=False, xattr=False, _expand_macros=False):
      
      flags = 0
      if create_path:
          flags |= _P.SDSPEC_F_MKDIR_P
      if xattr:
          flags |= _P.SDSPEC_F_XATTR
      if _expand_macros:
          flags |= _P.SDSPEC_F_EXPANDMACROS
      return Spec(op, path, flags, value)
docs: Like `_gen_3spec`, but also accepts a mandatory value as its third argument
      :param bool _expand_macros: Whether macros in the value should be expanded.
          The macros themselves are defined at the server side