def load_map(map, src_file, output_dir, scale=1, cache_dir=None, datasources_cfg=None, user_styles=[], verbose=False):
    """ Apply a stylesheet source file to a given mapnik Map instance, like mapnik.load_map().
    
        Parameters:
        
          map:
            Instance of mapnik.Map.
        
          src_file:
            Location of stylesheet .mml file. Can be relative path, absolute path,
            or fully-qualified URL of a remote stylesheet.
        
          output_dir:
            ...
        
        Keyword Parameters:
        
          scale:
            Optional scale value for output map, 2 doubles the size for high-res displays.
        
          cache_dir:
            ...
        
          datasources_cfg:
            ...
        
          user_styles:
            A optional list of files or URLs, that override styles defined in
            the map source. These are evaluated in order, with declarations from
            later styles overriding those from earlier styles.
        
          verbose:
            ...
    """
    scheme, n, path, p, q, f = urlparse(src_file)
    
    if scheme in ('file', ''):
        assert exists(src_file), "We'd prefer an input file that exists to one that doesn't"
    
    if cache_dir is None:
        cache_dir = expanduser(CACHE_DIR)
        
        # only make the cache dir if it wasn't user-provided
        if not isdir(cache_dir):
            mkdir(cache_dir)
            chmod(cache_dir, 0755)

    dirs = Directories(output_dir, realpath(cache_dir), dirname(src_file))
    compile(src_file, dirs, verbose, datasources_cfg=datasources_cfg, user_styles=user_styles, scale=scale).to_mapnik(map, dirs)