  def MatchLabels(self) -> Dict[str, str]:
    """Gets the label key-value pairs in the matchLabels field.

    Returns:
      Dict[str, str]: The labels in the matchLabels field.

    Raises:
      NotImplementedError: If matchExpressions exist, in which case using the
          matchLabels will be inaccurate.
    """
    read = self.Read()

    if read.spec.selector.match_expressions:
      raise NotImplementedError(
          'matchExpressions exist, meaning using '
          'matchLabels will be inaccurate.')

    match_labels = read.spec.selector.match_labels  # type: Dict[str, str]
    return match_labels
Gets the label key-value pairs in the matchLabels field.

Returns:
Dict[str, str]: The labels in the matchLabels field.

Raises:
NotImplementedError: If matchExpressions exist, in which case using the
matchLabels will be inaccurate.
libcloudforensics/providers/kubernetes/workloads.py