code: def _convert_codecs(template, byte_order):
      """Convert codec template mapping to byte order
  
      Set codecs not on this system to None
  
      Parameters
      ----------
      template : mapping
         key, value are respectively codec name, and root name for codec
         (without byte order suffix)
      byte_order : {'<', '>'}
         code for little or big endian
  
      Returns
      -------
      codecs : dict
         key, value are name, codec (as in .encode(codec))
      """
      codecs = {}
      postfix = byte_order == "<" and "_le" or "_be"
      for k, v in template.items():
          codec = v["codec"]
          try:
              " ".encode(codec)
          except LookupError:
              codecs[k] = None
              continue
          if v["width"] > 1:
              codec += postfix
          codecs[k] = codec
      return codecs.copy()
  
file_path: scipy/scipy/io/matlab/_mio5_params.py
imports: import numpy
  from ._miobase import convert_dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_codecs(template, byte_order) and returns: codecs