code: def latest_version(cls, version_list, major=None):
      if major:
          filtered_version_list = list(
              cls.filter_versions(version_list, major)
          )
          if not filtered_version_list:
              raise MajorVersionDoesNotExistError(major)
          return cls.sort_versions(filtered_version_list)[0]
      return cls.sort_versions(version_list)[0]
  
imports: import re
  import typing
  from modelkit.assets import errors
  from modelkit.assets.versioning import versioning
label_desc: Use image node_id 13 for calling the MajorMinorAssetsVersioningSystem obj's underlying member method code with example usage: obj.latest_version(cls, version_list, major) and returns: cls, cls