def shebang_to_require(shebang, use_bytes=True):
    """Convert shebang to the format of requirement.
    If the use_bytes argument is set to False, executable path
    is returned as a string instead of the default bytes type."""
    executable_path = shebang.split()[0][2:]
    if use_bytes:
        return executable_path.encode()
    else:
        return executable_path