code: def _resolve_view(data_type):
      
      view = getattr(data_type, 'view', None)
      if view is not None:
          return view
  
      if isinstance(data_type, _ATOMIC):
          out = None
      elif isinstance(data_type, Array):
          out = _define_array_view(data_type)
      elif isinstance(data_type, Structure):
          out = _define_structure_view(data_type)
  
      return out
docs: Retrieve the view for a given data type.
  
      Only one view class is returned, that is the one representing the root data
      type, but more class objects might be dynamically created if the input
      data type has nested elements, such as for the `Array` and `Structure`
      types.
  
      The default behaviour of dynamically and recursively creating a new view
      class can be overriden by setting the `view` attribute of a data type.