def convert_weight(val, old_scale="kg", new_scale="pound"):
    """
    Convert from a weight scale to another one among kg, gram, and pound.

    Parameters
    ----------
    val: float or int
        Value of the weight to be converted expressed in the original scale.

    old_scale: str
        Original scale from which the weight value will be converted.
        Supported scales are Kilogram ['Kilogram', 'kilogram', 'kg'],
        Gram ['Gram', 'gram', 'gr'] or Pound ['Pound', 'pound', 'pd'].

    new_scale: str
        New scale from which the weight value will be converted.
        Supported scales are Kilogram ['Kilogram', 'kilogram', 'kg'],
        Gram ['Gram', 'gram', 'gr'] or Pound ['Pound', 'pound', 'pd'].

    Raises
    -------
    NotImplementedError if either of the scales are not one of the requested
    ones.

    Returns
    -------
    res: float
        Value of the converted weight expressed in the new scale.
    """
    # Convert from 'old_scale' to Kg
    if old_scale.lower() in ['kilogram', 'kg']:
        temp = val
    elif old_scale.lower() in ['gram', 'gr']:
        temp = val / 1000.0
    elif old_scale.lower() in ['pound', 'pd']:
        temp = 0.4535924 * val
    else:
        raise AttributeError(
            f'{old_scale} is unsupported. kg, gr, and pound are supported')
    # and from kg to 'new_scale'
    if new_scale.lower() in ['kilogram', 'kg']:
        result = temp
    elif new_scale.lower() in ['gram', 'gr']:
        result = 1000 * temp
    elif new_scale.lower() in ['pound', 'pd']:
        result= temp / 0.4535924
    else:
        raise AttributeError(
            f'{new_scale} is unsupported. kg, gr, and pound are supported')
    return result