code: func (c *fabricCAAdapter) RemoveIdentity(key core.Key, cert []byte, request *api.RemoveIdentityRequest) (*api.IdentityResponse, error) {
  
  	logger.Debugf("Removing identity [%s]", request.ID)
  
  	// Create remove request
  	req := caapi.RemoveIdentityRequest{
  		CAName: request.CAName,
  		Force:  request.Force,
  		ID:     request.ID,
  	}
  
  	registrar, err := c.newIdentity(key, cert)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to create CA signing identity")
  	}
  
  	response, err := registrar.RemoveIdentity(&req)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to remove identity")
  	}
  
  	return getIdentityResponse(response), nil
  }
docs: // RemoveIdentity  removes identity
  // key: registrar private key
  // cert: registrar enrollment certificate