code: func listOrgs(stub shim.ChaincodeStubInterface) pb.Response {
  	_, parameters := stub.GetFunctionAndParameters()
  	if len(parameters) < 1 {
  		return shim.Error("No key specified")
  	}
  
  	// get the endorsement policy for the key
  	var epBytes []byte
  	var err error
  	if parameters[0] == "pub" {
  		epBytes, err = stub.GetStateValidationParameter("pub")
  	} else if parameters[0] == "priv" {
  		epBytes, err = stub.GetPrivateDataValidationParameter("col", "priv")
  	} else {
  		return shim.Error("Unknown key specified")
  	}
  	ep, err := statebased.NewStateEP(epBytes)
  	if err != nil {
  		return shim.Error(err.Error())
  	}
  
  	// get the list of organizations in the endorsement policy
  	orgs := ep.ListOrgs()
  	orgsList, err := json.Marshal(orgs)
  	if err != nil {
  		return shim.Error(err.Error())
  	}
  
  	return shim.Success(orgsList)
  }
docs: // listOrgs returns the list of organizations currently part of
  // the state's endorsement policy