def create(cls, jar):
    """Creates an actual M2Coordinate from the given M2Coordinate-like object (eg a JarDependency).

    :API: public

    :param JarDependency jar: the input coordinate.
    :return: A new M2Coordinate, unless the input is already an M2Coordinate in which case it just
      returns the input unchanged.
    :rtype: M2Coordinate
    """
    if isinstance(jar, cls):
      return jar
    return cls(org=jar.org, name=jar.name, rev=jar.rev, classifier=jar.classifier, ext=jar.ext)