def expand_contractions(text, contractions):
    """
    Method used to expand the contractions from the text"

    Parameters:
    -----------------
        text (string): Text to clean
        contractions (dict): Dictionary of contractions with expansion
                             for each contraction

    Returns:
    -----------------
        text (string): Text after transforming the contractions.

    """

    # Tokenizing text into tokens.
    tokens = text.split(" ")

    for token in tokens:

        # Checking whether token is in contractions as a key
        if token in contractions:

            # Token is replace if is in dictionary and tokens
            tokens = [item.replace(token, contractions[token])
                      for item in tokens]

    # Transforming from list to string
    text = " ".join(str(token) for token in tokens)

    return text