code: public static byte[] stringToId(final String branch_id) {
      if (branch_id == null || branch_id.isEmpty()) {
        throw new IllegalArgumentException("Branch ID was empty");
      }
      if (branch_id.length() < 4) {
        throw new IllegalArgumentException("Branch ID was too short");
      }
      String id = branch_id;
      if (id.length() % 2 != 0) {
        id = "0" + id;
      }
      return DatatypeConverter.parseHexBinary(id);
    }
docs: Converts a hex string to a branch ID byte array (row key)
  @param branch_id The branch ID to convert
  @return The branch ID as a byte array
  @throws IllegalArgumentException if the string is not valid hex