code: def format_labels(labels):
      
      if labels:
          return ','.join(['{}={}'.format(k, v) for k, v in labels.items()])
      else:
          return ''
docs: Convert a dictionary of labels into a comma separated string