import re


def parse_duration(s):
    
    """
    Parse a `duration` string and convert it to numeric.

    Parameters
    ----------
    s : str or float
        `duration` value

    Returns
    -------
    Int
        Numeric `duration` value
    """
    
    # Check if value is null or already a float
    if isinstance(s, float):
        return s
    
    # Remove seconds, "m", and spaces
    s = re.sub(r'\:\s*\d{1,2}', '', s)
    s = re.sub(r'm|\s*', '', s, flags=re.IGNORECASE)
    
    # Convert to int
    match = re.search(r'(\d)(ho?u?r?s?)(\d\d?)?', s, flags=re.IGNORECASE)
    if match: # if time is in hours
        i = int(match.group(1)) * 60 # hours to minutes
        if match.group(3):
            return i + int(match.group(3)) # add minutes
    else: # if time is in minutes
        return int(s)