code: def _calc_order(self, order):
          
          if order is not None and order != '':
              self.order = order.upper()
          else:
              shape = self.shape
              if len(shape) <= 2:
                  self.order = 'M'
              else:
                  depth = shape[-1]
                  # TODO: need something better here than a guess!
                  if depth == 1:
                      self.order = 'M'
                  elif depth == 2:
                      self.order = 'AM'
                  elif depth == 3:
                      self.order = 'RGB'
                  elif depth == 4:
                      self.order = 'RGBA'
docs: Called to set the order of a multi-channel image.
          The order should be determined by the loader, but this will
          make a best guess if passed `order` is `None`.