code: func (c *CAClientImpl) CreateIdentity(request *api.IdentityRequest) (*api.IdentityResponse, error) {
  
  	if c.adapter == nil {
  		return nil, fmt.Errorf("no CAs configured for organization: %s", c.orgName)
  	}
  
  	if request == nil {
  		return nil, errors.New("must provide identity request")
  	}
  
  	// Checke required parameters (ID and affiliation)
  	if request.ID == "" || request.Affiliation == "" {
  		return nil, errors.New("ID and affiliation are required")
  	}
  
  	registrar, err := c.getRegistrar(c.registrar.EnrollID, c.registrar.EnrollSecret)
  	if err != nil {
  		return nil, err
  	}
  
  	return c.adapter.CreateIdentity(registrar.PrivateKey(), registrar.EnrollmentCertificate(), request)
  }
docs: // CreateIdentity create a new identity with the Fabric CA server. An enrollment secret is returned which can then be used,
  // along with the enrollment ID, to enroll a new identity.
  //  Parameters:
  //  request holds info about identity
  //
  //  Returns:
  //  Return identity info including secret