def position(keyword='', url='', positions='', topkeyword=''):
  """Return the position a provided site is in for a given keyword."""
  if not url:
    return "lite value required in column or Config tab."
  apexdom = apex(url)
  if topkeyword:
    keyword = topkeyword
  if not positions:
    def gpositions(keyword):
      global positions
      return positions(keyword)
    positions = gpositions(keyword)
  elif positions:
    urldict = json.loads(positions)
    for thepos, aurl in urldict.iteritems():
      if apexdom in aurl:
        return thepos
dataset/ETHPy150Open miklevin/pipulate/common.py/position/original