code: def get_fmt_v3(data_type, size):
      
      if data_type in {v3c.DATA_TYPE_STRING, v3c.DATA_TYPE_BYTEARRAY}:
          size = size // 8
          if data_type == v3c.DATA_TYPE_STRING:
              fmt = f"S{size}"
          elif data_type == v3c.DATA_TYPE_BYTEARRAY:
              fmt = f"({size},)u1"
      else:
          if size <= 8:
              size = 1
          elif size <= 16:
              size = 2
          elif size <= 32:
              size = 4
          elif size <= 64:
              size = 8
          else:
              size = size // 8
  
          if data_type in (v3c.DATA_TYPE_UNSIGNED_INTEL, v3c.DATA_TYPE_UNSIGNED):
              fmt = f"<u{size}".format()
  
          elif data_type == v3c.DATA_TYPE_UNSIGNED_MOTOROLA:
              fmt = f">u{size}"
  
          elif data_type in (v3c.DATA_TYPE_SIGNED_INTEL, v3c.DATA_TYPE_SIGNED):
              fmt = f"<i{size}"
  
          elif data_type == v3c.DATA_TYPE_SIGNED_MOTOROLA:
              fmt = f">i{size}"
  
          elif data_type in {
              v3c.DATA_TYPE_FLOAT,
              v3c.DATA_TYPE_DOUBLE,
              v3c.DATA_TYPE_FLOAT_INTEL,
              v3c.DATA_TYPE_DOUBLE_INTEL,
          }:
              fmt = f"<f{size}"
  
          elif data_type in (v3c.DATA_TYPE_FLOAT_MOTOROLA, v3c.DATA_TYPE_DOUBLE_MOTOROLA):
              fmt = f">f{size}"
  
      return fmt
docs: convert mdf versions 2 and 3 channel data type to numpy dtype format
      string
  
      Parameters
      ----------
      data_type : int
          mdf channel data type
      size : int
          data bit size
      Returns
      -------
      fmt : str
          numpy compatible data type format string