code: def _as_directed(graph, *args, **kwds):
      """Returns a directed copy of this graph. Arguments are passed on
      to L{GraphBase.to_directed()} that is invoked on the copy.
      """
      copy = graph.copy()
      copy.to_directed(*args, **kwds)
      return copy
  
file_path: python-igraph/src/igraph/basic.py
imports: from igraph._igraph import GraphBase
  from igraph.seq import EdgeSeq
  from igraph.utils import deprecated
label_desc: Use image node_id 7 for calling a global function with example usage: _as_directed(graph) and returns: copy