def handle_branch(repo, **kwargs):
    log.info('branch: %s %s' %(repo, kwargs))
    if type(repo) in [unicode, str]:
        path = os.path.join(repo, kwargs.get('name', 'Unnamed'))
        desc = kwargs.get('desc')
        branch = Repo.new(path=path, desc=desc, bare=True)
    else:
        name = kwargs.get('name')
        path = kwargs.get('path')
        if path and not name:
            name = os.path.basename(path)
        desc = kwargs.get('desc')
        branch = repo.branch(name=name, desc=desc)
    return branch.serialize()
return square of a number
dataset/ETHPy150Open rsgalloway/grit/grit/server/handler.py/handle_branch--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/docs/examples/newparallel/demo/map.py/square