def fetch()

in script/common.py [0:0]


def fetch(url, file):
  if not os.path.exists(file):
    print('Downloading', url)
    if os.path.dirname(file):
      os.makedirs(os.path.dirname(file), exist_ok = True)
    # if url.startswith('https://packages.jetbrains.team/'):
    #   check_call(["curl", "--fail", "--location", '--show-error', url, '--output', file])
    # else:
    with open(file, 'wb') as f:
      f.write(urllib.request.urlopen(url).read())