Utility that detects and returns the columns that are forward returns

def get_forward_returns_columns(columns):
    """
    Utility that detects and returns the columns that are forward returns
    """
    pattern = re.compile(r"^(\d+([Dhms]|ms|us|ns))+$", re.IGNORECASE)
    valid_columns = [(pattern.match(col) is not None) for col in columns]
    return columns[valid_columns]