docs: def prepare_attr_for_state(txn, path_only=False):
      """
      Make key(path)-value pair for state from ATTRIB or GET_ATTR
      :return: state path, state value, value for attribute store
      """
      assert get_type(txn) == ATTRIB
      txn_data = get_payload_data(txn)
      nym = txn_data[TARGET_NYM]
      attr_type, attr_key, value = parse_attr_txn(txn_data)
      path = make_state_path_for_attr(nym, attr_key, attr_type == HASH)
      if path_only:
          return path
      hashed_value = hash_of(value) if value else ''
      seq_no = get_seq_no(txn)
      txn_time = get_txn_time(txn)
      value_bytes = encode_state_value(hashed_value, seq_no, txn_time)
      return attr_type, path, value, hashed_value, value_bytes