def translocation(from_loc, to_loc):
    """Make a translocation dictionary.

    :param dict from_loc: An entity dictionary from :func:`pybel.dsl.entity`
    :param dict to_loc: An entity dictionary from :func:`pybel.dsl.entity`
    :rtype: dict
    """
    rv = _activity_helper(TRANSLOCATION)
    rv[EFFECT] = {
        FROM_LOC: Entity(namespace=BEL_DEFAULT_NAMESPACE, name=from_loc) if isinstance(from_loc, str) else from_loc,
        TO_LOC: Entity(namespace=BEL_DEFAULT_NAMESPACE, name=to_loc) if isinstance(to_loc, str) else to_loc,
    }
    return rv
def translocation ( from_loc , to_loc ) : rv = _activity_helper ( TRANSLOCATION ) rv [ EFFECT ] = { FROM_LOC : Entity ( namespace = BEL_DEFAULT_NAMESPACE , name = from_loc ) if isinstance ( from_loc , str ) else from_loc , TO_LOC : Entity ( namespace = BEL_DEFAULT_NAMESPACE , name = to_loc ) if isinstance ( to_loc , str ) else to_loc , } return rv
Make a translocation dictionary.

    :param dict from_loc: An entity dictionary from :func:`pybel.dsl.entity`
    :param dict to_loc: An entity dictionary from :func:`pybel.dsl.entity`
    :rtype: dict