def init_task(parts, name='init-pdpart'):
    """Create a doit task to initialize a Partitioned directory.

    Parameters
    ----------
    parts : pdpart.Partitioned
        Partitioned object to be initialized
    name : str
        name of task, defaults to 'init-pdpart'
    """
    def _wrapper():
        """withhold return value for compatibility with doit"""
        parts.init_dir()

    return {
        'name': name,
        'actions': [(_wrapper, [], {})],
        'file_dep': [],
        'targets': [parts.fn_meta],
        'uptodate': [True],
    }