<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getLatency(self, instId: int) -> float: """ Return a dict with client identifier as a key and calculated latency as a value """

        if len(self.clientAvgReqLatencies) == 0:
            return 0.0
        return self.clientAvgReqLatencies[instId].get_avg_latency()