parameters: (*args)
docstring: Helper to coalesce a list of version_ids down to one
docstring_summary: Helper to coalesce a list of version_ids down to one
docstring_tokens: Helper to coalesce a list of version_ids down to one
function: def _coalesce_version_id(*args):
      """Helper to coalesce a list of version_ids down to one"""
      version_ids = set(args)
      if None in version_ids:
          version_ids.remove(None)
      if len(version_ids) > 1:
          raise ValueError(
              "Cannot coalesce version_ids where more than one are defined,"
              " {}".format(version_ids))
      elif len(version_ids) == 0:
          return None
      else:
          return version_ids.pop()
function_tokens: def _coalesce_version_id ( * args ) : version_ids = set ( args ) if None in version_ids : version_ids . remove ( None ) if len ( version_ids ) > 1 : raise ValueError ( "Cannot coalesce version_ids where more than one are defined," " {}" . format ( version_ids ) ) elif len ( version_ids ) == 0 : return None else : return version_ids . pop ( )