def METHOD_NAME(name, version, epoch, commit_hash):
  # The epoch field is only present in certain packages and will return
  # '(none)' otherwise.
  if 'none' in epoch:
    epoch = ''
  # Match debian style version which includes epoch.
  if epoch:
    version = '%s:%s' % (epoch, version)
  return {'name': name, 'version': version, 'commit_hash': commit_hash}