from typing import Any, Callable, Dict, List, Optional, Text, Type

class is_url: 
    def is_url(resource_name: Text) -> bool:
    """Return True if string is an http, ftp, or file URL path.
    This implementation is the same as the one used by matplotlib"""

           URL_REGEX = re.compile(r'http://|https://|ftp://|file://|file:\\')
            return URL_REGEX.match(resource_name) is not None