original_docstring: 
      try to figure out dockerfile from provided path and optionally from relative local path
      this is meant to be used with git repo: absolute_path is path to git repo,
      local_path is path to dockerfile within git repo
  
      :param absolute_path:
      :param local_path:
      :return: tuple, (dockerfile_path, dir_with_dockerfile_path)
      
docstring: try to figure out dockerfile from provided path and optionally from relative local path
  this is meant to be used with git repo: absolute_path is path to git repo,
  local_path is path to dockerfile within git repo
docstring_tokens: try to figure out dockerfile from provided path and optionally from relative local path this is meant to be used with git repo : absolute_path is path to git repo local_path is path to dockerfile within git repo
code: def figure_out_dockerfile(absolute_path, local_path=None):
      """
      try to figure out dockerfile from provided path and optionally from relative local path
      this is meant to be used with git repo: absolute_path is path to git repo,
      local_path is path to dockerfile within git repo
  
      :param absolute_path:
      :param local_path:
      :return: tuple, (dockerfile_path, dir_with_dockerfile_path)
      """
      logger.info("searching for dockerfile in '%s' (local path %s)", absolute_path, local_path)
      logger.debug("abs path = '%s', local path = '%s'", absolute_path, local_path)
      if local_path:
          if local_path.endswith(DOCKERFILE_FILENAME):
              git_df_dir = os.path.dirname(local_path)
              df_dir = os.path.abspath(os.path.join(absolute_path, git_df_dir))
          else:
              df_dir = os.path.abspath(os.path.join(absolute_path, local_path))
      else:
          df_dir = os.path.abspath(absolute_path)
      if not os.path.isdir(df_dir):
          raise IOError("Directory '%s' doesn't exist." % df_dir)
      df_path = os.path.join(df_dir, DOCKERFILE_FILENAME)
      if not os.path.isfile(df_path):
          raise IOError("Dockerfile '%s' doesn't exist." % df_path)
      logger.debug("Dockerfile found: '%s'", df_path)
      return df_path, df_dir
code_tokens: def figure_out_dockerfile ( absolute_path , local_path = None ) : logger . info ( "searching for dockerfile in '%s' (local path %s)" , absolute_path , local_path ) logger . debug ( "abs path = '%s', local path = '%s'" , absolute_path , local_path ) if local_path : if local_path . endswith ( DOCKERFILE_FILENAME ) : git_df_dir = os . path . dirname ( local_path ) df_dir = os . path . abspath ( os . path . join ( absolute_path , git_df_dir ) ) else : df_dir = os . path . abspath ( os . path . join ( absolute_path , local_path ) ) else : df_dir = os . path . abspath ( absolute_path ) if not os . path . isdir ( df_dir ) : raise IOError ( "Directory '%s' doesn't exist." % df_dir ) df_path = os . path . join ( df_dir , DOCKERFILE_FILENAME ) if not os . path . isfile ( df_path ) : raise IOError ( "Dockerfile '%s' doesn't exist." % df_path ) logger . debug ( "Dockerfile found: '%s'" , df_path ) return df_path , df_dir
short_docstring: try to figure out dockerfile from provided path and optionally from relative local path
  this is meant to be used with git repo: absolute_path is path to git repo,
  local_path is path to dockerfile within git repo
short_docstring_tokens: try to figure out dockerfile from provided path and optionally from relative local path this is meant to be used with git repo : absolute_path is path to git repo local_path is path to dockerfile within git repo
comment: """
      try to figure out dockerfile from provided path and optionally from relative local path
      this is meant to be used with git repo: absolute_path is path to git repo,
      local_path is path to dockerfile within git repo
  
      :param absolute_path:
      :param local_path:
      :return: tuple, (dockerfile_path, dir_with_dockerfile_path)
      """