code: def overlay_depth(obj):
      
      if isinstance(obj, DynamicMap):
          if isinstance(obj.last, CompositeOverlay):
              return len(obj.last)
          elif obj.last is None:
              return None
          return 1
      else:
          return 1
docs: Computes the depth of a DynamicMap overlay if it can be determined
      otherwise return None.