code: def _decompose(compound_name):
      
      reg, repo, tag = '', compound_name, ''
      if '/' in repo:
          reg, repo = repo.split('/', 1)
      if ':' in repo:
          repo, tag = repo.rsplit(':', 1)
      return reg, repo, tag
docs: '[reg/]repo[:tag]' -> (reg, repo, tag)