from typing import List


def extract_dependencies_from_meta_yaml(meta_yaml_content: dict) -> List[str]:
    """
    Extract the dependencies defined in the requirements-run-section.

    If additional dev-requirements are defined in the
    extra-dev_requirements-section, these dependencies are added to the other
    dependencies.

    Parameters:
        meta_yaml_content: the content from a ``meta.yaml`` as a dict.

    Returns:
        the collected dependencies.

    """
    # extract the dependencies defined the the requirements-run-section
    dependencies = meta_yaml_content['requirements']['run']

    # remove the python version definition. The version will be extracted
    # from the extra-python section
    dependencies = list(
        filter(
            lambda x: x.split(' ')[0] != 'python',
            dependencies
        )
    )

    if meta_yaml_content['requirements'].get('run_constrained'):
        dependencies.extend(
            meta_yaml_content['requirements']['run_constrained']
        )

    if meta_yaml_content['extra']['cenv'].get('dev_requirements'):
        dependencies.extend(meta_yaml_content['extra']['cenv']['dev_requirements'])

    # append the python version to use in the conda environment
    dependencies.append(f'python {meta_yaml_content["extra"]["cenv"]["python"]}')
    return dependencies