code: def cli(location, **kwargs):
      """Geocode an arbitrary number of strings from Command Line."""
  
      locations = []
  
      # Read Standard Input
      # $ cat foo.txt | geocode
      try:
          for line in fileinput.input():
              locations.append(line.strip())
      except:
          pass
  
      # Read multiple files & user input location
      for item in location:
          if os.path.exists(item):
              with open(item, "rb") as f:
                  locations += f.read().splitlines()
          else:
              locations.append(item)
  
      # Distance calculation
      if kwargs["distance"]:
          d = geocoder.distance(locations, **kwargs)
          click.echo(d)
          return
  
      # Geocode results from user input
      for location in locations:
          g = geocoder.get(location.strip(), **kwargs)
          try:
              click.echo(json.dumps(getattr(g, kwargs["output"])))
          except IOError:
              # When invalid command is entered a broken pipe error occurs
              return
  
imports: from __future__ import absolute_import
  import click
  import json
  import geocoder
  import os
  import fileinput
  from geocoder.api import options
label_desc: Use image node_id 1 for calling a global function with example usage: cli(location) without return types