def platform_to_tags(platform, interpreter):
  """Splits a "platform" like linux_x86_64-36-cp-cp36m into its components.

  If a simple platform without hyphens is specified, we will fall back to using
  the current interpreter's tags.
  """
  if platform.count('-') >= 3:
    tags = platform.rsplit('-', 3)
  else:
    tags = [platform, interpreter.identity.impl_ver,
            interpreter.identity.abbr_impl, interpreter.identity.abi_tag]
  tags[0] = tags[0].replace('.', '_').replace('-', '_')
  return tags
Splits a "platform" like linux_x86_64-36-cp-cp36m into its components.

  If a simple platform without hyphens is specified, we will fall back to using
  the current interpreter's tags.