def _get_deps(meta, section=None):
    """
    meta : dict-like
        Parsed meta.yaml file.

    section : str, list, or None
        If None, returns all dependencies. Otherwise can be a string or list of
        options [build, host, run, test] to return section-specific dependencies.
    """
    def get_name(dep):
        return dep.split()[0]

    reqs = (meta.get_section('requirements') or {})
    if reqs is None:
        return []
    if section is None:
        sections = ['build', 'host', 'run', 'test']
    elif isinstance(section, str):
        sections = [section]
    else:
        sections = section
    deps = []
    for s in sections:
        dep = (reqs.get(s) or [])
        if dep:
            deps += [get_name(d) for d in dep]
    return deps