def getSourcePlug(attribute):
    """
    Convenience method for getting the source plug attribute of given attribute.

    Args:
        attribute (pm.general.Attribute): Attribute to see if it's connected or not and get its source connection.

    Returns:
        (pm.general.Attribute): Attribute that is connected to drive given attribute.
    """
    return attribute.connections(scn=True, p=True, d=False)[0] if attribute.isDestination() else None