code: def serialize_dtype(o):
      
      if len(o) == 0:
          return dict(
              _type='np.dtype',
              descr=str(o))
      return dict(
          _type='np.dtype',
          descr=o.descr)
docs: Serializes a :obj:`numpy.dtype`.
  
      Args:
          o (:obj:`numpy.dtype`): :obj:`dtype` to be serialized.
  
      Returns:
          A dictionary that can be passed to :obj:`json.dumps`.