code: def merge_strings(list_of_strings: Union[List[str], Tuple[str]]) -> dict:
      
      if not isinstance(list_of_strings, (tuple, list)):
          raise TypeError("list_of_strings must be either a tuple or a list")
      if len(list_of_strings) == 0:
          return {"strings": numpy.array([], dtype="S1"),
                  "lengths": numpy.array([], dtype=int),
                  "str": None}
      with_str = not isinstance(list_of_strings[0], bytes)
      if with_str:
          if not isinstance(list_of_strings[0], str):
              raise TypeError("list_of_strings must contain either bytes or strings")
          strings = numpy.array(["".join(list_of_strings).encode("utf-8")])
      else:
          merged = bytearray(sum(len(s) for s in list_of_strings))
          offset = 0
          for s in list_of_strings:
              merged[offset:offset + len(s)] = s
              offset += len(s)
          strings = numpy.frombuffer(merged, dtype="S%d" % len(merged))
      lengths = [0] * len(list_of_strings)
      for i, s in enumerate(list_of_strings):
          lengths[i] = len(s)
      lengths = squeeze_bits(numpy.array(lengths, dtype=int))
      return {"strings": strings, "lengths": lengths, "str": with_str}
docs: Pack the list of strings into two arrays: the concatenated chars and the \
      individual string lengths. :func:`split_strings()` does the inverse.
  
      :param list_of_strings: The :class:`tuple` or :class:`list` of :class:`str`-s \
                              or :class:`bytes`-s to pack.
      :return: :class:`dict` with "strings" and "lengths" \
               :class:`numpy.ndarray`-s.