code: def remove(cls, target, exclude=None, ctx=None, select=lambda *p: True):
          
  
          # initialize exclude
          exclude = () if exclude is None else exclude
  
          try:
              # get local annotations
              local_annotations = get_local_property(
                  target, Annotation.__ANNOTATIONS_KEY__
              )
  
          except TypeError:
              raise TypeError('target {0} must be hashable'.format(target))
  
          # if there are local annotations
          if local_annotations is not None:
  
              # get annotations to remove which inherits from cls
              annotations_to_remove = [
                  annotation for annotation in local_annotations
                  if (
                      isinstance(annotation, cls)
                      and not isinstance(annotation, exclude)
                      and select(target, ctx, annotation)
                  )
              ]
  
              # and remove annotations from target
              for annotation_to_remove in annotations_to_remove:
                  annotation_to_remove.remove_from(target)
docs: Remove from target annotations which inherit from cls.
  
          :param target: target from where remove annotations which inherits from
              cls.
          :param tuple/type exclude: annotation types to exclude from selection.
          :param ctx: target ctx.
          :param select: annotation selection function which takes in parameters
              a target, a ctx and an annotation and return True if the annotation
              has to be removed.