def get_value_labels(x):
  """Obtain the value labels of an object.

  Value labels are character strings that describe the meaning of the values in
  a data cube. They are mainly used for categorical data, in which integer
  indices are the value in the cube, and the labels store the name of each
  category.

  Parameters
  ----------
    x:
      Object to obtain the value labels from.

  Returns
  --------
    :obj:`dict`
      The obtained value labels as a dictionary containing value-label pairs.
      If the object does not have value labels stored, the function will return
      ``None``.

  """
  try:
    vlabs = x.sq.value_labels
  except AttributeError:
    vlabs = None
  return vlabs