def get_conda_platform_from_python(py_platform):
    """
    Converts a python platform string to a corresponding conda platform

    Parameters
    ----------
    py_platform : str
        The python platform string

    Returns
    -------
    str
        The conda platform string

    """
    python_to_conda_platform_map = {'darwin': 'osx', 'linux': 'linux',
        'openbsd': 'openbsd', 'win': 'win', 'zos': 'zos'}
    for k in python_to_conda_platform_map:
        if py_platform.startswith(k):
            return python_to_conda_platform_map[k]
    return None
