code: func New(clientProvider context.ClientProvider, opts ...ClientOption) (*Client, error) {
  
  	ctx, err := clientProvider()
  	if err != nil {
  		return nil, errors.WithMessage(err, "failed to create Client")
  	}
  
  	msp := Client{
  		ctx: ctx,
  	}
  
  	for _, param := range opts {
  		err := param(&msp)
  		if err != nil {
  			return nil, errors.WithMessage(err, "failed to create Client")
  		}
  	}
  
  	if msp.orgName == "" {
  		msp.orgName = ctx.IdentityConfig().Client().Organization
  	}
  	if msp.orgName == "" {
  		return nil, errors.New("organization is not provided")
  	}
  
  	caConfig, ok := ctx.IdentityConfig().CAConfig(msp.orgName)
  	if ok {
  		msp.caName = caConfig.CAName
  	}
  
  	networkConfig := ctx.EndpointConfig().NetworkConfig()
  	_, ok = networkConfig.Organizations[strings.ToLower(msp.orgName)]
  	if !ok {
  		return nil, fmt.Errorf("non-existent organization: '%s'", msp.orgName)
  	}
  	return &msp, nil
  }
docs: // New creates a new Client instance